glibc/sysdeps/aarch64
Adhemerval Zanella b868b45f67 elf: Fix dynamic-link.h usage on rtld.c
The 4af6982e4c fix does not fully handle RTLD_BOOTSTRAP usage on
rtld.c due two issues:

  1. RTLD_BOOTSTRAP is also used on dl-machine.h on various
     architectures and it changes the semantics of various machine
     relocation functions.

  2. The elf_get_dynamic_info() change was done sideways, previously
     to 490e6c62aa get-dynamic-info.h was included by the first
     dynamic-link.h include *without* RTLD_BOOTSTRAP being defined.
     It means that the code within elf_get_dynamic_info() that uses
     RTLD_BOOTSTRAP is in fact unused.

To fix 1. this patch now includes dynamic-link.h only once with
RTLD_BOOTSTRAP defined.  The ELF_DYNAMIC_RELOCATE call will now have
the relocation fnctions with the expected semantics for the loader.

And to fix 2. part of 4af6982e4c is reverted (the check argument
elf_get_dynamic_info() is not required) and the RTLD_BOOTSTRAP
pieces are removed.

To reorganize the includes the static TLS definition is moved to
its own header to avoid a circular dependency (it is defined on
dynamic-link.h and dl-machine.h requires it at same time other
dynamic-link.h definition requires dl-machine.h defitions).

Also ELF_MACHINE_NO_REL, ELF_MACHINE_NO_RELA, and ELF_MACHINE_PLT_REL
are moved to its own header.  Only ancient ABIs need special values
(arm, i386, and mips), so a generic one is used as default.

The powerpc Elf64_FuncDesc is also moved to its own header, since
csu code required its definition (which would require either include
elf/ folder or add a full path with elf/).

Checked on x86_64, i686, aarch64, armhf, powerpc64, powerpc32,
and powerpc64le.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
(cherry picked from commit d6d89608ac)

Resolved conflicts:
	elf/rtld.c
2022-04-08 14:18:11 -04:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
multiarch AArch64: Check for SVE in ifuncs [BZ #28744] 2022-01-07 10:10:27 +01:00
nptl 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.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
__mtag_tag_region.S aarch64: Optimize __libc_mtag_tag_region 2021-03-26 11:03:06 +00:00
__mtag_tag_zero_region.S aarch64: Optimize __libc_mtag_tag_zero_region 2021-03-26 11:03:06 +00:00
abort-instr.h
atomic-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-_setjmp.c
bsd-setjmp.c
configure config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01:00
configure.ac config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01:00
crti.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-bti.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-link.sym
dl-lookupcfg.h aarch64: free tlsdesc data on dlclose [BZ #27403] 2021-04-06 14:35:05 +01:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
dl-prop.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tlsdesc.S aarch64: push the set of rules before falling into slow path 2021-01-05 09:25:19 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tunables.list Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
e_sqrtl.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hp-timing.h AArch64: Add hp-timing.h 2021-07-01 15:42:05 +01:00
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-mtag.h aarch64: inline __libc_mtag_new_tag 2021-03-26 11:03:06 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-test-ulps aarch64: update libm test ulps 2021-04-08 08:24:30 +01:00
libm-test-ulps-name
linkmap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile glibc.malloc.check: Wean away from malloc hooks 2021-07-22 18:38:08 +05:30
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcount.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memcpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memmove.c
memrchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset-reg.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure
rawmemchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sfp-machine.h
sotruss-lib.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
start.S Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchrnul.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
string_private.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strncmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strnlen.S AArch64: Improve strnlen performance 2021-07-01 15:32:36 +01:00
strrchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI 2021-05-26 12:01:06 +01:00
tls-macros.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tlsdesc.c elf: Remove lazy tlsdesc relocation related code 2021-04-21 14:35:53 +01:00
tlsdesc.sym
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ifunc-arg-1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ifunc-arg-2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs-mod.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions