From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id CD133384F011; Mon, 21 Nov 2022 21:21:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD133384F011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Re: ld: Always output local symbol for relocatable link X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 28a072f4af84ad295d37f8aa70c5fec9d36a274c X-Git-Newrev: e9a20a419b66431766e59dec75265ccdc0bf1046 Message-Id: <20221121212134.CD133384F011@sourceware.org> Date: Mon, 21 Nov 2022 21:21:34 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2022 21:21:34 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De9a20a419b66= 431766e59dec75265ccdc0bf1046 commit e9a20a419b66431766e59dec75265ccdc0bf1046 Author: Alan Modra Date: Thu Nov 10 09:33:08 2022 +1030 Re: ld: Always output local symbol for relocatable link =20 Remove this code dating back to commit 98790d3a95fc entirely, what it was trying to do is done elsewhere. =20 PR ld/29761 * elflink.c (elf_link_output_symstrtab): Don't handle symbols in SEC_EXCLUDE sections here. Diff: --- bfd/elflink.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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) =3D=3D STB_GNU_UNIQUE) elf_tdata (flinfo->output_bfd)->has_gnu_osabi |=3D elf_gnu_osabi_uniqu= e; =20 - if (name =3D=3D NULL - || *name =3D=3D '\0' - || (!bfd_link_relocatable (flinfo->info) - && (input_sec->flags & SEC_EXCLUDE))) + if (name =3D=3D NULL || *name =3D=3D '\0') elfsym->st_name =3D (unsigned long) -1; else {