public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] elf: Never set non_ir_ref_regular for debug reference
Date: Wed, 14 Aug 2024 07:49:58 +0930	[thread overview]
Message-ID: <ZrvcDusB2fsKVaXh@squeak.grove.modra.org> (raw)
In-Reply-To: <20240813000105.1287316-1-hjl.tools@gmail.com>

On Mon, Aug 12, 2024 at 05:01:05PM -0700, H.J. Lu wrote:
> 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.

OK.
> 
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
>  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
> -- 
> 2.46.0

-- 
Alan Modra

      reply	other threads:[~2024-08-13 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  0:01 H.J. Lu
2024-08-13 22:19 ` Alan Modra [this message]

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=ZrvcDusB2fsKVaXh@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).