binutils ld and new PT_GNU_PROPERTY segment
Florian Weimer
fweimer@redhat.com
Wed Apr 1 10:21:41 GMT 2020
* Szabolcs Nagy:
> The 04/01/2020 11:29, Florian Weimer wrote:
>> * Szabolcs Nagy:
>> > why only -r is problematic?
>> >
>> > i thought linking exactly one marked object and other non-marked
>> > ones with an old linker will have the (incorrect) marking on the
>> > output that cannot be recognised as wrong.
>>
>> Where do you get that single marked object?
>>
>> If you are on a CET-enabled distribution, the startup files are marked,
>> so you have multiple marked objects right there.
>
> assume your toolchain is not cet enabled (and has an old
> linker) but you link in a library archive that is cet
> enabled (because it was given to you that way) and exactly
> one .o from it gets used during the link.
>
> the resulting binary will have the marking and if deployed
> on a cet enabled system it won't work. (at least this is
> my current understanding.)
But that's not something we currently support. We do not have ABI
stability for static linking like this. You are more likely to run into
problems due to other issues (e.g., missing glibc symbols) than
incorrect CET markup.
Thanks,
Florian
More information about the Binutils
mailing list