public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: ld: Always output local symbol for relocatable link
Date: Tue, 22 Nov 2022 07:51:00 +1030	[thread overview]
Message-ID: <Y3vrvIjpSUFeTNqJ@squeak.grove.modra.org> (raw)

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
     {

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-11-21 21:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3vrvIjpSUFeTNqJ@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).