diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-05-16 18:41:43 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-05-16 18:42:03 +0200 |
commit | f787e138aa0bf677bf74fa2a08595c446292f3d7 (patch) | |
tree | 8c9f9e876a6ae14ecd58dfd0628fa40018ae09a3 /sysdeps/generic/ldsodefs.h | |
parent | b57ab258c1140bc45464b4b9908713e3e0ee35aa (diff) | |
download | glibc-f787e138aa0bf677bf74fa2a08595c446292f3d7.tar.gz glibc-f787e138aa0bf677bf74fa2a08595c446292f3d7.tar.xz glibc-f787e138aa0bf677bf74fa2a08595c446292f3d7.zip |
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>
Diffstat (limited to 'sysdeps/generic/ldsodefs.h')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 4a5e698db2..5d0369358d 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1211,6 +1211,11 @@ extern struct link_map * _dl_get_dl_main_map (void) # endif #endif +/* Perform early memory allocation, avoding a TCB dependency. + Terminate the process if allocation fails. May attempt to use + brk. */ +void *_dl_early_allocate (size_t size) attribute_hidden; + /* Initialize the DSO sort algorithm to use. */ #if !HAVE_TUNABLES static inline void |