Skip to content
Commit 29a4db29 authored by Florian Weimer's avatar Florian Weimer
Browse files

malloc: Use __libc_initial to detect an inner libc



The secondary/non-primary/inner libc (loaded via dlmopen, LD_AUDIT,
static dlopen) must not use sbrk to allocate member because that would
interfere with allocations in the outer libc.  On Linux, this does not
matter because sbrk itself was changed to fail in secondary libcs.

 _dl_addr occasionally shows up in profiles, but had to be used before
because __libc_multiple_libs was unreliable.  So this change achieves
a slight reduction in startup time.

Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent e7570f41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment