glibc/sysdeps/powerpc/powerpc64
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
..
a2 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
be Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bits Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
cell Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
le Add narrowing fma functions 2021-09-22 21:25:31 +00:00
multiarch powerpc64: Add checks for Altivec and VSX in ifunc selection 2021-08-06 16:10:08 -03:00
power4 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
power6 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
power7 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
power8 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
__longjmp-common.S 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
addmul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
atomic-machine.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
backtrace.c powerpc64: Workaround sigtramp vdso return call 2021-01-28 13:57:50 -03:00
bsd-_setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
bsd-setjmp.S PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
bzero.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
configure powerpc64: Fix calls when r2 is not used [BZ #26173] 2020-07-10 19:41:06 -03:00
configure.ac powerpc64: Fix calls when r2 is not used [BZ #26173] 2020-07-10 19:41:06 -03: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-dtprocnum.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-funcdesc.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
dl-irel.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
dl-machine.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
entry.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ffsll.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
hp-timing.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Implies Revert "Use ieee754/dbl-64/wordsize-64 on powerpc64" 2013-01-10 10:44:05 +01:00
lshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Remove stale references to libdl.a 2021-06-09 19:14:02 +02:00
memcpy.S 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
mul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ppc-mcount.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
rtld-memset.c powerpc: Use generic memset for RTLD for ppc32/64 2010-09-29 12:21:14 -04:00
setjmp-bug21895.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp-common.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
stackguard-macros.h PowerPC: Fix POINTER_CHK_GUARD thread register for PPC64 2013-09-25 13:43:04 -05:00
start.S Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
strchr.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
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
submul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h Add build option to disable usage of scv on powerpc 2021-06-10 16:23:25 -03:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-setjmp-bug21895-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ucontext-ppc64-vscr.c powerpc: Fix unrecognized instruction errors with recent GCC 2021-09-20 16:52:38 -05:00