[PATCH] D118490: [lld][ELF] add .note sections from linker scripts as SHT_NOTE
Zbigniew Jędrzejewski-Szmek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 11:34:43 PST 2022
keszybz added a comment.
>> No, I already explained in the sentence you quoted, compiled objecs are not a realistic option.
>
> I do not see why it is a complication.
If we couldn't use a linker script, we could probably try to make a compiled object work.
But a linker script is certainly a lot easier. In particular, we don't know if we have any particular
compiler installed (a package might pull in one of the C or C++ compilers, or ocaml/fortran/ada/…),
and we don't have a good place to do compilation. It's one thing to write a hundred bytes of text for
the linker note, and quite another to generate some sources and then then call a compiler on that.
I guess that if we can't make the linker script work, we could fall back to a compiled object for lld
and/or gold. But it's require a lot more scaffolding.
> Does .note.package need to follow .note.gnu.build-id?
There is is a benefit in having things in the *some* predictable order.
But no, in general the order shouldn't matter.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118490/new/
https://reviews.llvm.org/D118490
More information about the llvm-commits
mailing list