glibc/sysdeps/arm
Adhemerval Zanella d6d89608ac 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>
2021-10-14 14:52:07 -03:00
..
armv6 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
armv6t2 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
armv7 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
be arm: Fix softp-fp Implies (BZ #25635) 2020-03-06 09:53:24 -03:00
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
include/bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
le arm: Fix softp-fp Implies (BZ #25635) 2020-03-06 09:53:24 -03:00
nofpu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nptl elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02: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
add_n.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_assert.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_atexit.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_errno_addr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_lcsts.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_localeconv.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_math.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_mb_cur_max.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_memclr.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_memcpy.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_memmove.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_memset.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_sighandlers.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
aeabi_unwind_cpp_pr1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arm-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arm-ifunc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arm-mcount.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
arm-unwind-resume.S Implement _Unwind_Resume in libc on top of <unwind-link.h> 2021-03-01 16:00:03 +01:00
atomic-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
backtrace.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
configure Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
configure.ac Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00: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-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-machine-rel.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03: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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-trampoline.S 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
fclrexcpt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fedisblxcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
feenablxcpt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fegetenv.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fegetexcept.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fegetmode.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fegetround.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fenv_private.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetenv.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetexcept.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fesetround.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
feupdateenv.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fgetexcptflg.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
find_exidx.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fix-fp-int-convert-overflow.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu_control.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
framestate.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ftestexcept.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gcc-compat.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gccframe.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldbl-classify-compat.h Move LDBL_CLASSIFY_COMPAT to its own header. 2018-02-01 21:01:00 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-aeabi_read_tp.S ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-test-ulps arm: update libm test ulps 2021-04-08 09:55:33 +01:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-use-builtins-sqrt.h arm: Use sqrt{f} builtin 2020-06-22 11:09:50 -03:00
memcpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memmove.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memset.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure arm: Split BE/LE abilist 2019-08-29 09:58:21 -03:00
preconfigure.ac arm: Split BE/LE abilist 2019-08-29 09:58:21 -03:00
rt-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
rt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rtld-global-offsets.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
setfpucw.c 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 Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
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
stap-probe-machine.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
static-stubs.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
strlen.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sub_n.S Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-fpucw.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tlsdesc.c elf: Remove lazy tlsdesc relocation related code 2021-04-21 14:35:53 +01:00
tlsdesc.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tst-armtlsdescextlazy.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextlazymod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnow.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnowmod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-armtlsdesclocmod.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unwind-arch.h Implement _Unwind_Resume in libc on top of <unwind-link.h> 2021-03-01 16:00:03 +01:00
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unwind-pe.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
unwind-resume.c Implement _Unwind_Resume in libc on top of <unwind-link.h> 2021-03-01 16:00:03 +01:00
unwind-resume.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
unwind.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Versions Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00