public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <i@maskray.me>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org, Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] elf: Discard input .note.gnu.build-id sections
Date: Tue, 30 Nov 2021 23:56:10 -0800	[thread overview]
Message-ID: <20211201075610.sqmloojhop67p4ze@gmail.com> (raw)
In-Reply-To: <Yaci1lH1uAIdzfVt@squeak.grove.modra.org>

On 2021-12-01, Alan Modra via Binutils wrote:
>On Tue, Nov 30, 2021 at 08:46:04PM -0800, H.J. Lu via Binutils wrote:
>> 1. Discard input .note.gnu.build-id , excluding the first one.
>> 2. Clear the build ID field before writing.
>> 3. Use the input .note.gnu.build-id section if available.
>
>It's simpler to mark all input .note.gnu.build-id sections with
>SEC_EXCLUDE then use bfd_make_section_anyway_with_flags to create a
>new section.  That way you'll avoid any problems that might occur when
>trying to use an existing section.  For example, the size might change
>with a change in build-id style, leading to section contents buffer
>overflow.

For --build-id=none final link, should .note.gnu.build-id input sections
be combined? This is the currently ld.bfd (and ld.lld)'s behavior.

  reply	other threads:[~2021-12-01  7:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  4:46 H.J. Lu
2021-12-01  7:23 ` Alan Modra
2021-12-01  7:56   ` Fangrui Song [this message]
2021-12-01 11:55     ` Alan Modra
2021-12-01 11:58       ` [PATCH v2] " H.J. Lu
2021-12-01 12:17         ` [PATCH v3] " H.J. Lu
2021-12-02  0:02           ` Alan Modra

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=20211201075610.sqmloojhop67p4ze@gmail.com \
    --to=i@maskray.me \
    --cc=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).