glibc/sysdeps/sparc/sparc64
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 Define wordsize.h macros everywhere 2016-11-04 09:37:44 -07:00
fpu Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
multiarch 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
align-cpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
backtrace.h Use libgcc unwinder for sparc backtraces, if available. 2013-01-21 14:15:30 -08:00
bzero.c Sparc string routines from Jakub. 1999-03-29 13:25:15 +00:00
dl-irel.h 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 2022-04-08 14:18:11 -04:00
dl-plt.h 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
hp-timing.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile 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.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
pthread_spin_init.c SPARC: Consolidate unnecessary nptl/ subdirectories. 2014-06-25 10:04:14 -07:00
pthread_spin_lock.S nptl: Move pthread_spin_lock into libc 2021-04-23 17:06:46 +02:00
pthread_spin_trylock.S nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
pthread_spin_unlock.S nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc 2021-04-23 17:06:44 +02:00
pthreaddef.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_add.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_cmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_cmpe.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_div.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_dtoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_feq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_fge.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_fgt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_fle.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_flt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_fne.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_itoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_mul.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_neg.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtod.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtoi.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtos.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtoui.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtoux.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_qtox.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_sqrt.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_stoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_sub.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_uitoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_util.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_uxtoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
qp_xtoq.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rtld-memcpy.c Fix sparc build. 2014-11-14 10:32:52 -08:00
rtld-memmove.c sparc: assembly version of memmove for ultra1+ 2017-12-14 08:47:09 -02:00
rtld-memset.c Use generic memset/memcpy in rtld on sparcv9/sparc64. 2012-03-28 22:22:15 -07:00
sfp-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04: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
stpncpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strcat.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
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
strcspn.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
strncpy.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strpbrk.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strrchr.c Sparc string routines from Jakub. 1999-03-29 13:25:15 +00:00
strspn.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sub_n.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
tls-macros.h Split tls-macros.h into sysdeps directories. 2012-07-17 11:30:58 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Remove sysdeps/sparc/sparc64/soft-fp directory. 2018-05-25 20:00:51 +00:00