This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: extend dl-minimal malloc implementation
On Sat, Aug 12, 2017 at 5:06 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * Carlos O'Donell:
>
>> But would we use that API for *every* allocation in the loader?
>
> There are probably some exceptions. The error message returned by
> dlsym comes to my mind. This is the kind of project where you
> discover the scope only after you are half-way through it. 8-/
There is also the question of what to do when the application replaces
(the full-fledged) malloc.
I wonder if it might be more productive to work in the opposite
direction and try to *eliminate* use of malloc within the dynamic
linker, aiming for a point where it would be reasonable to send all of
its memory allocations directly to mmap().
(I've also been wondering off and on, lately, whether there'd be any
way to convert glibc over to the musl model where ld.so, libc.so, and
libpthread.so are all the same shared object, without breaking the
ABI. Many things would become simpler... on the other hand, the
bootstrap process might become more complicated!)
zw