From e9a20a419b66431766e59dec75265ccdc0bf1046 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 10 Nov 2022 09:33:08 +1030 Subject: 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. --- bfd/elflink.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bfd/elflink.c') diff --git a/bfd/elflink.c b/bfd/elflink.c index 81b3412..a141c9e 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 { -- cgit v1.1