[PATCH] elf: Add elf checks for main executable

Florian Weimer fweimer@redhat.com
Tue Dec 14 09:18:07 GMT 2021


* Fāng-ruì Sòng:

> On Tue, Dec 14, 2021 at 1:03 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * Fāng-ruì Sòng:
>>
>> > If the question is: "if upstream glibc implements the diagnostic, will
>> > ChromeOS port the patch to their glibc".  My reply is non-authoritative,
>> > but if this has not been a problem for more than 3 years now, I do know
>> > see large value backporting the feature to their older glibc release.
>>
>> But if you don't backport, you can teach your toolchain to start
>> producing binaries that fail to load on older glibc.  You will have to
>> keep creating binaries that lack proper markup.
>>
>> My concern is that we go through all this trouble to implement a version
>> proper handshake, and yet Google binaries will still crash on older
>> glibc.
>
> 3+ years ago, "still crash on older glibc" was considered an
> acceptable compromise as the scenario (cared by some upstream glibc
> folks) is simply unsupported (and by many other groups).
>
> Now after 3 years, (while this is unsupported) back porting RELR
> executables to less-than-3 year old ChromeOS would still work because
> all glibc releases in the past 3 years support RELR. If you consider
> symbol versioning, many symbols get new symbols which won't run on
> 3-year-old glibc anyway.

I have a feeling we are talking past each other.

Based on previous mail exchanges, I think you would use an lld option to
build binaries which use DT_RELR but do not have any version lockout for
older glibc (so that these binaries still work on your older glibc with
DT_RELR).

Thanks,
Florian



More information about the Libc-alpha mailing list