public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Fangrui Song <i@maskray.me>
Cc: Luca Boccassi <luca.boccassi@gmail.com>,  binutils@sourceware.org
Subject: Re: [PATCH] ld: add --package-metadata
Date: Wed, 25 May 2022 09:53:26 +0200	[thread overview]
Message-ID: <87zgj682vd.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220525065658.mxvpugjgnh3dt7de@gmail.com> (Fangrui Song's message of "Tue, 24 May 2022 23:56:58 -0700")

* Fangrui Song:

> On 2022-05-17, Luca Boccassi via Binutils wrote:
>>On Tue, 17 May 2022 at 07:03, Florian Weimer <fweimer@redhat.com> wrote:
>>>
>>> * Fangrui Song:
>>>
>>> > Both the "FDO" and the json dependency make me concerned -
>>> > if a linker script approach works quite well, why bother with a new
>>> > linker option with a very specific application?
>>>
>>> The linker script does not work all that well because it requires that
>>> the script is materialized to disk somewhere, and that path needs to
>>> show up in the build flags.  If the build flags are stored beyond the
>>> build for future use, this makes them invalid because the path will
>>> typically be gone by the time the stored flags are used.
>>>
>>> Thanks,
>>> Florian
>
> Do you mean that a user may need to re-link the executable/shared
> object? The note content must be preserved somewhere, I don't see how
>
> as ... -o meta.o
> ld.bfd ... meta.o
>
> is more inconvenient than
>
> ld.bfd --package-meta='content' ...

If the object file is put into /build/builddir/BUILD/foo-12.3/meta.o,
the full path ends up in LDFLAGS.  (The validity of a relative path
would depend on the package-specific build system.)  But if we do that,
and the package build system captures LDFLAGS into some generated
artifact that controls link editor invocation, it may try to link with
/build/builddir/BUILD/foo-12.3/meta.o.  But that file will no longer
exist at the time.

> The "FDO" owner also makes me concerned. It seems a bit arbitrary.

It's the usual abbreviation for freedesktop.org, where the specification
lives.

> https://src.fedoraproject.org/rpms/package-notes/pull-request/2#comment-98855 (tstellar)
> says
> "Given, that I'm the maintainer of lld in Fedora, if I volunteer to deal
> with issues that stem from this assembler based implementation would you
> be more likely to accept this patch?"
>
> It would be nice to have a list of packages and fix them (perhaps
> issues like not honor LDFLAGS).

I think this is unrelated to honoring LDFLAGS or not.

Thanks,
Florian


  reply	other threads:[~2022-05-25  7:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 19:18 luca.boccassi
2022-05-16 16:40 ` Fangrui Song
2022-05-17  6:03   ` Florian Weimer
2022-05-17 14:44     ` Luca Boccassi
2022-05-25  6:56       ` Fangrui Song
2022-05-25  7:53         ` Florian Weimer [this message]
2022-05-23 11:26 ` Luca Boccassi
2022-05-24  9:34   ` Jose E. Marchesi
2022-05-24 11:26     ` Luca Boccassi
2022-05-24 16:23 ` Nick Clifton
2022-05-24 18:38   ` Luca Boccassi
2022-05-25  8:45     ` Florian Weimer
2022-05-25 13:53       ` Luca Boccassi
2022-05-30 14:08         ` Florian Weimer
2022-05-24 16:28 ` Nick Clifton
2022-05-24 21:15 ` [PATCH v2] " luca.boccassi
2022-05-25  4:30   ` Alan Modra
2022-05-25  6:02     ` Alan Modra
2022-05-25 13:42       ` Luca Boccassi
2022-05-25 13:41 ` [PATCH v3] " luca.boccassi
2022-05-26  3:55   ` Alan Modra
2022-05-26 10:46     ` Luca Boccassi

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=87zgj682vd.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    --cc=luca.boccassi@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).