This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/5] Add single-threaded path to _int_malloc
Szabolcs Nagy wrote:
> the address of malloc must be const during the lifetime of a
> process, since it can be saved in a variable that can be later
> used as func ptr.
The application always gets the address of the fixed PLT entry, including
in a statically linked binary. So calling via a function pointer will still use
a PLT indirection. Not sure what happens inside a dynamic library itself,
but that would work fine if that gets the address of the same PLT entry
(if not then the addresses would already be different today).
Wilco