public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] elf: Never set non_ir_ref_regular for debug reference
@ 2024-08-13 22:47 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-08-13 22:47 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=549bc65f0599c04e57818cc920b39e24b67500d2

commit 549bc65f0599c04e57818cc920b39e24b67500d2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Aug 12 17:01:05 2024 -0700

    elf: Never set non_ir_ref_regular for debug reference
    
    Never set non_ir_ref_regular for debug reference since references in
    debug sections shouldn't impact LTO output.
    
            * elflink.c (elf_link_add_object_symbols): Don't check strip for
            references in debug sections when setting non_ir_ref_regular.
    
    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 bfd/elflink.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 2430d606c30..ed0bd71859b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5718,9 +5718,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
 	  if ((s->flags & SEC_RELOC) == 0
 	      || s->reloc_count == 0
 	      || (s->flags & SEC_EXCLUDE) != 0
-	      || ((info->strip == strip_all
-		   || info->strip == strip_debugger)
-		  && (s->flags & SEC_DEBUGGING) != 0))
+	      || (s->flags & SEC_DEBUGGING) != 0)
 	    continue;
 
 	  internal_relocs = _bfd_elf_link_info_read_relocs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-13 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 22:47 [binutils-gdb] elf: Never set non_ir_ref_regular for debug reference H.J. Lu

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).