glibc/sysdeps/powerpc
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
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu powerpc: update libm test ulps 2021-10-06 10:50:33 -03:00
nofpu Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
nptl elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
power4 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
power6 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
powerpc32 elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
powerpc64 elf: Fix dynamic-link.h usage on rtld.c 2021-10-14 14:52:07 -03:00
sys/platform Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
abort-instr.h
atomic-machine.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
cpu-features.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
cpu-features.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tls.c 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-tunables.list 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
ffs.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
fpu_control.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
hwcapinfo.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hwcapinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ifunc-sel.h Fix powerpc ifunc-sel.h build for -Os. 2018-03-02 22:27:56 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale-defines.sym
longjmp.c nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile powerpc: Fix unrecognized instruction errors with recent binutils 2021-09-29 14:42:20 -05:00
math-tests-snan-cast.h 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
mod-cache-ppc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mod-tlsopt-powerpc.c elf: Drop elf/tls-macros.h in favor of __thread and tls_model attributes [BZ #28152] [BZ #28205] 2021-08-16 09:59:30 -07:00
mp_clz_tab.c
novmx-longjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
novmx-sigjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
novmxsetjmp.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure powerpc: Add support for POWER10 2020-06-29 10:08:38 -03:00
preconfigure.ac powerpc: Add support for POWER10 2020-06-29 10:08:38 -03:00
rtld-global-offsets.sym powerpc: Move cache line size to rtld_global_ro 2020-01-17 09:05:03 -03:00
sigjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08: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
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-arith.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-arithf.c
test-get_hwcap-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-get_hwcap.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-gettimebase.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-cache-ppc-static-dlopen.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-cache-ppc-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-cache-ppc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-set_ppr.c powerpc: Fix unrecognized instruction errors with recent binutils 2021-09-29 14:42:20 -05:00
tst-stack-align.h Properly check stack alignment [BZ #27901] 2021-05-24 07:42:12 -07:00
tst-tlsifunc-static.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-tlsifunc.c elf: Drop elf/tls-macros.h in favor of __thread and tls_model attributes [BZ #28152] [BZ #28205] 2021-08-16 09:59:30 -07:00
tst-tlsopt-powerpc.c tst-tlsopt-powerpc as a shared lib 2017-08-03 15:39:21 +09:30
Versions nptl: Move __pthread_unwind_next into libc 2021-04-21 19:49:50 +02:00