glibc/csu
Florian Weimer 035c012e32 Reduce the statically linked startup code [BZ #23323]
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.
2021-02-25 12:13:02 +01:00
..
abi-note.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
check_fds.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dso_handle.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno-loc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
errno.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gmon-start.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
init-first.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
init.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-start.c Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
start.c More fallout from supporting only ELF 2012-01-08 00:45:01 -05:00
static-reloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
version.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00