glibc/sysdeps/unix/sysv/linux/sh
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
..
be Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
le Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
sh3 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sh4 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sys Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
adaptive_spin_count.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arch-syscall.h Update syscall lists for Linux 5.11. 2021-02-19 21:16:27 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
c++-types.data SH: Consolidate nptl/ subdirectories under linux/..... 2014-06-23 09:23:12 -07:00
clone.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
jmp_buf-macros.h Add jmp_buf-macros.h 2017-11-09 05:10:03 -08:00
kernel_sigaction.h m68k: Fix sigaction kernel definition (BZ #23960) 2018-12-18 16:45:10 -02:00
kernel_stat.h linux: Set default kernel_stat.h to LFS 2021-02-11 07:58:05 -03:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localplt.data ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] 2020-02-15 11:01:23 +01:00
lowlevel-atomic.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
makecontext.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile SH: ____longjmp_chk for GNU/Linux with sigaltstack support. 2012-06-23 11:56:02 +02:00
pipe.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
register-dump.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sigaltstack-offsets.sym SH: ____longjmp_chk for GNU/Linux with sigaltstack support. 2012-06-23 11:56:02 +02:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscall.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
syscalls.list posix: Consolidate Linux waitpid syscall 2017-05-18 18:06:47 -03:00
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
vfork.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00