csu: Implement and use _dl_early_allocate during static startup
commitf787e138aa0bf677bf74fa2a08595c446292f3d7
authorFlorian Weimer <fweimer@redhat.com>
Mon, 16 May 2022 16:41:43 +0000 (16 18:41 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 16 May 2022 16:42:03 +0000 (16 18:42 +0200)
tree8c9f9e876a6ae14ecd58dfd0628fa40018ae09a3
parentb57ab258c1140bc45464b4b9908713e3e0ee35aa
csu: Implement and use _dl_early_allocate during static startup

This implements mmap fallback for a brk failure during TLS
allocation.

scripts/tls-elf-edit.py is updated to support the new patching method.
The script no longer requires that in the input object is of ET_DYN
type.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
csu/libc-tls.c
elf/Makefile
elf/dl-early_allocate.c [new file with mode: 0644]
elf/tst-tls-allocation-failure-static.c [new file with mode: 0644]
scripts/tst-elf-edit.py
sysdeps/generic/ldsodefs.h
sysdeps/unix/sysv/linux/dl-early_allocate.c [new file with mode: 0644]