Introduce <elf-initfini.h> and ELF_INITFINI for all architectures
authorFlorian Weimer <fweimer@redhat.com>
Tue, 18 Feb 2020 13:42:41 +0000 (14:42 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 18 Feb 2020 14:12:25 +0000 (15:12 +0100)
commitf4349837d93b4dfe9ba09791e280ee2d6c99919f
tree2d9b57dc8a2b38bc369e0e0f89232046d8be38ca
parent6e05978f0c30e52420e086cc3156655471e6fb0a
Introduce <elf-initfini.h> and ELF_INITFINI for all architectures

This supersedes the init_array sysdeps directory.  It allows us to
check for ELF_INITFINI in both C and assembler code, and skip DT_INIT
and DT_FINI processing completely on newer architectures.

A new header file is needed because <dl-machine.h> is incompatible
with assembler code.  <sysdep.h> is compatible with assembler code,
but it cannot be included in all assembler files because on some
architectures, it redefines register names, and some assembler files
conflict with that.

<elf-initfini.h> is replicated for legacy architectures which need
DT_INIT/DT_FINI support.  New architectures follow the generic default
and disable it.
26 files changed:
csu/elf-init.c
csu/gmon-start.c
elf/dl-fini.c
elf/dl-init.c
nptl/pt-crti.S
sysdeps/aarch64/elf-initfini.h [new file with mode: 0644]
sysdeps/alpha/elf-initfini.h [moved from sysdeps/init_array/pt-crti.S with 70% similarity]
sysdeps/arm/elf-initfini.h [new file with mode: 0644]
sysdeps/csky/Implies
sysdeps/generic/crti.S [moved from sysdeps/init_array/crti.S with 80% similarity]
sysdeps/generic/crtn.S [moved from sysdeps/init_array/crtn.S with 82% similarity]
sysdeps/generic/elf-initfini.h [new file with mode: 0644]
sysdeps/hppa/elf-initfini.h [new file with mode: 0644]
sysdeps/ia64/elf-initfini.h [new file with mode: 0644]
sysdeps/init_array/elf-init.c [deleted file]
sysdeps/init_array/gmon-start.c [deleted file]
sysdeps/m68k/elf-initfini.h [new file with mode: 0644]
sysdeps/microblaze/elf-initfini.h [new file with mode: 0644]
sysdeps/mips/elf-initfini.h [new file with mode: 0644]
sysdeps/nios2/elf-initfini.h [new file with mode: 0644]
sysdeps/powerpc/elf-initfini.h [new file with mode: 0644]
sysdeps/riscv/Implies
sysdeps/s390/elf-initfini.h [new file with mode: 0644]
sysdeps/sh/elf-initfini.h [new file with mode: 0644]
sysdeps/sparc/elf-initfini.h [new file with mode: 0644]
sysdeps/x86/elf-initfini.h [new file with mode: 0644]