about summary refs log tree commit diff
path: root/sysdeps/x86/ldsodefs.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-11-03 11:20:50 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-11-09 14:11:25 -0300
commitb05fae4d8e34604a72ee36d2d3164391b76fcf0b (patch)
treea66b3f943d6b70b27326261fcb60063378e4c67f /sysdeps/x86/ldsodefs.h
parentdb6c4935fae6005d46af413b32aa92f4f6059dce (diff)
downloadglibc-b05fae4d8e34604a72ee36d2d3164391b76fcf0b.tar.gz
glibc-b05fae4d8e34604a72ee36d2d3164391b76fcf0b.tar.xz
glibc-b05fae4d8e34604a72ee36d2d3164391b76fcf0b.zip
elf: Use the minimal malloc on tunables_strdup
The rtld_malloc functions are moved to its own file so it can be
used on csu code.  Also, the functiosn are renamed to __minimal_*
(since there are now used not only on loader code).

Using the __minimal_malloc on tunables_strdup() avoids potential
issues with sbrk() calls while processing the tunables (I see
sporadic elf/tst-dso-ordering9 on powerpc64le with different
tests failing due ASLR).

Also, using __minimal_malloc over plain mmap optimizes the memory
allocation on both static and dynamic case (since it will any unused
space in either the last page of data segments, avoiding mmap() call,
or from the previous mmap() call).

Checked on x86_64-linux-gnu, i686-linux-gnu, and powerpc64le-linux-gnu.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/x86/ldsodefs.h')
0 files changed, 0 insertions, 0 deletions