mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
035c012e32
It turns out the startup code in csu/elf-init.c has a perfect pair of ROP gadgets (see Marco-Gisbert and Ripoll-Ripoll, "return-to-csu: A New Method to Bypass 64-bit Linux ASLR"). These functions are not needed in dynamically-linked binaries because DT_INIT/DT_INIT_ARRAY are already processed by the dynamic linker. However, the dynamic linker skipped the main program for some reason. For maximum backwards compatibility, this is not changed, and instead, the main map is consulted from __libc_start_main if the init function argument is a NULL pointer. For statically linked binaries, the old approach based on linker symbols is still used because there is nothing else available. A new symbol version __libc_start_main@@GLIBC_2.34 is introduced because new binaries running on an old libc would not run their ELF constructors, leading to difficult-to-debug issues. |
||
---|---|---|
.. | ||
abi-note.c | ||
check_fds.c | ||
dso_handle.c | ||
errno-loc.c | ||
errno.c | ||
gmon-start.c | ||
init-first.c | ||
init.c | ||
libc-start.c | ||
libc-tls.c | ||
Makefile | ||
start.c | ||
static-reloc.c | ||
sysdep.c | ||
version.c | ||
Versions |