glibc/sysdeps/sparc/sparc64
Fangrui Song 490e6c62aa elf: Avoid nested functions in the loader [BZ #27220]
dynamic-link.h is included more than once in some elf/ files (rtld.c,
dl-conflict.c, dl-reloc.c, dl-reloc-static-pie.c) and uses GCC nested
functions. This harms readability and the nested functions usage
is the biggest obstacle prevents Clang build (Clang doesn't support GCC
nested functions).

The key idea for unnesting is to add extra parameters (struct link_map
*and struct r_scope_elm *[]) to RESOLVE_MAP,
ELF_MACHINE_BEFORE_RTLD_RELOC, ELF_DYNAMIC_RELOCATE, elf_machine_rel[a],
elf_machine_lazy_rel, and elf_machine_runtime_setup. (This is inspired
by Stan Shebs' ppc64/x86-64 implementation in the
google/grte/v5-2.27/master which uses mixed extra parameters and static
variables.)

Future simplification:
* If mips elf_machine_runtime_setup no longer needs RESOLVE_GOTSYM,
  elf_machine_runtime_setup can drop the `scope` parameter.
* If TLSDESC no longer need to be in elf_machine_lazy_rel,
  elf_machine_lazy_rel can drop the `scope` parameter.

Tested on aarch64, i386, x86-64, powerpc64le, powerpc64, powerpc32,
sparc64, sparcv9, s390x, s390, hppa, ia64, armhf, alpha, and mips64.
In addition, tested build-many-glibcs.py with {arc,csky,microblaze,nios2}-linux-gnu
and riscv64-linux-gnu-rv64imafdc-lp64d.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-10-07 11:55:02 -07:00
..
bits
fpu Add narrowing fma functions 2021-09-22 21:25:31 +00:00
multiarch Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
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 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
backtrace.h
bzero.c
dl-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-machine.h elf: Avoid nested functions in the loader [BZ #27220] 2021-10-07 11:55:02 -07: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 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-unwind.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
lshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memchr.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memcmp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memcpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memmove.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
mul_1.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pthread_spin_init.c
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 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_cmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_cmpe.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_div.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_dtoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_feq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_fge.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_fgt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_fle.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_flt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_fne.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_itoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_mul.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_neg.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtod.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtoi.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtos.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtoui.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtoux.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_qtox.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_sqrt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_stoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_sub.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_uitoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_util.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_uxtoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
qp_xtoq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
rawmemchr.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
rshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rtld-memcpy.c
rtld-memmove.c sparc: assembly version of memmove for ultra1+ 2017-12-14 08:47:09 -02:00
rtld-memset.c
sfp-machine.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
stackguard-macros.h
start.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
stpcpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
stpncpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcat.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strchr.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcmp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strcspn.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strlen.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strncmp.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strncpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strpbrk.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strrchr.c
strspn.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
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
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