From: Alan Modra Date: Wed, 9 Nov 2022 23:03:08 +0000 (+1030) Subject: Re: ld: Always output local symbol for relocatable link X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9a20a419b66431766e59dec75265ccdc0bf1046;p=binutils-gdb.git Re: ld: Always output local symbol for relocatable link Remove this code dating back to commit 98790d3a95fc entirely, what it was trying to do is done elsewhere. PR ld/29761 * elflink.c (elf_link_output_symstrtab): Don't handle symbols in SEC_EXCLUDE sections here. --- diff --git a/bfd/elflink.c b/bfd/elflink.c index 81b34129463..a141c9eb0e8 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9995,10 +9995,7 @@ elf_link_output_symstrtab (void *finf, if (ELF_ST_BIND (elfsym->st_info) == STB_GNU_UNIQUE) elf_tdata (flinfo->output_bfd)->has_gnu_osabi |= elf_gnu_osabi_unique; - if (name == NULL - || *name == '\0' - || (!bfd_link_relocatable (flinfo->info) - && (input_sec->flags & SEC_EXCLUDE))) + if (name == NULL || *name == '\0') elfsym->st_name = (unsigned long) -1; else {