Pending fixes for all-ABIs builds

Florian Weimer fweimer@redhat.com
Wed Nov 9 08:14:00 GMT 2016


On 11/09/2016 12:21 AM, Joseph Myers wrote:
> On Tue, 8 Nov 2016, Florian Weimer wrote:
>
>> But there's one pre-existing issue I've been wondering about for a while
>> (along with the s390 maintainers): I don't understand why we have PLT
>> references to malloc & friends in ld.so.  The malloc implementation there is
>> not compliant with the C requirements.  Why is it exported, and why do we use
>> GOT indirection to call it?
>
> My understanding is that it's meant to be interposable by a user-provided
> malloc implementation.  See
> <https://sourceware.org/ml/libc-alpha/2014-01/msg00719.html>, item 3.

Does this mean the dynamic linker starts with it's GOT pointer as NULL, 
initializes that to point it to the malloc in elf/dl-minimal.c, and 
then, once libc.so.6 is relocated updates its GOT pointer to point to 
the malloc in libc.so.6?

If that's true, maybe a comment explaining all this in elf/dl-minimal.c 
would be helpful.

Thanks,
Florian



More information about the Libc-alpha mailing list