[PATCH] ld: add --package-metadata
Fangrui Song
i@maskray.me
Wed May 25 06:56:58 GMT 2022
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' ...
The "FDO" owner also makes me concerned. It seems a bit arbitrary.
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 left a comment on
https://github.com/rui314/mold/issues/505#issuecomment-1136277017 as
well.
>Indeed, it was working fine as an initial step to get the ball rolling and
>the spec adopted, but having to generate and reference an
>intermediate, temporary asset is not great and has drawbacks. Now
>that the spec is live and proven in production in Fedora 36 it seemed
>to me like a good time to introduce a first-class option, to make further
>usage and adoption as trivial as it can be.
>
>Kind regards,
>Luca Boccassi
More information about the Binutils
mailing list