2ec55de302
I was having a little closer look at what is going on here and noticed that HJ unconditionally emits a NULL STT_FILE symbol before emitting forced local symbols. That means we really don't need a second pass over forced local symbols. The only reason for two passes is when some forced local symbol can be emitted before the NULL STT_FILE. So I set about removing the second pass, updating the testsuite all over again. It's also unnecessary to emit the NULL STT_FILE when no previous file symbol has been emitted. bfd/ PR ld/17975 * elflink.c (struct elf_outext_info): Remove need_second_pass and second_pass. (elf_link_output_extsym): Delete code handling second forced local pass. Move code emitting NULL STT_FILE symbol later, so that it can be omitted if forced local is stripped. Don't emit the NULL STT_FILE if no file symbols have been output. (bfd_elf_final_link): Remove second forced local pass. * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms. (ppc_elf_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc_build_one_stub): Likewise. (build_global_entry_stubs): Likewise. (ppc64_elf_build_stubs): Likewise. ld/testsuite/ PR ld/17975 * ld-aarch64/gc-tls-relocs.d, * ld-alpha/tlspic.rd, * ld-cris/libdso-2.d, * ld-i386/tlsdesc-nacl.rd, * ld-i386/tlsdesc.rd, * ld-i386/tlsnopic-nacl.rd, * ld-i386/tlsnopic.rd, * ld-i386/tlspic-nacl.rd, * ld-i386/tlspic.rd, * ld-ia64/tlspic.rd, * ld-powerpc/tlsexe.r, * ld-powerpc/tlsexetoc.r, * ld-powerpc/tlsso.r, * ld-powerpc/tlstocso.r, * ld-s390/tlspic.rd, * ld-s390/tlspic_64.rd, * ld-sparc/tlssunnopic32.rd, * ld-sparc/tlssunnopic64.rd, * ld-sparc/tlssunpic32.rd, * ld-sparc/tlssunpic64.rd, * ld-tic6x/shlib-1.rd, * ld-tic6x/shlib-1b.rd, * ld-tic6x/shlib-1r.rd, * ld-tic6x/shlib-1rb.rd, * ld-tic6x/shlib-noindex.rd, * ld-x86-64/tlsdesc-nacl.rd, * ld-x86-64/tlsdesc.rd, * ld-x86-64/tlspic-nacl.rd, * ld-x86-64/tlspic.rd: Update. |
||
---|---|---|
.. | ||
gotop32.dd | ||
gotop32.rd | ||
gotop32.s | ||
gotop32.sd | ||
gotop32.td | ||
gotop64.dd | ||
gotop64.rd | ||
gotop64.s | ||
gotop64.sd | ||
gotop64.td | ||
sparc.exp | ||
tlsg32.s | ||
tlsg32.sd | ||
tlsg64.s | ||
tlsg64.sd | ||
tlslib.s | ||
tlsnopic.s | ||
tlspic.s | ||
tlssunbin32.dd | ||
tlssunbin32.rd | ||
tlssunbin32.s | ||
tlssunbin32.sd | ||
tlssunbin32.td | ||
tlssunbin64.dd | ||
tlssunbin64.rd | ||
tlssunbin64.s | ||
tlssunbin64.sd | ||
tlssunbin64.td | ||
tlssunbinpic32.s | ||
tlssunbinpic64.s | ||
tlssunnopic32.dd | ||
tlssunnopic32.rd | ||
tlssunnopic32.s | ||
tlssunnopic32.sd | ||
tlssunnopic64.dd | ||
tlssunnopic64.rd | ||
tlssunnopic64.s | ||
tlssunnopic64.sd | ||
tlssunpic32.dd | ||
tlssunpic32.rd | ||
tlssunpic32.s | ||
tlssunpic32.sd | ||
tlssunpic32.td | ||
tlssunpic64.dd | ||
tlssunpic64.rd | ||
tlssunpic64.s | ||
tlssunpic64.sd | ||
tlssunpic64.td | ||
vxworks1-lib.dd | ||
vxworks1-lib.nd | ||
vxworks1-lib.rd | ||
vxworks1-lib.s | ||
vxworks1-lib.td | ||
vxworks1-static.d | ||
vxworks1.dd | ||
vxworks1.ld | ||
vxworks1.rd | ||
vxworks1.s | ||
vxworks2-static.sd | ||
vxworks2.s | ||
vxworks2.sd |