glibc/sysdeps/alpha
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
..
alphaev5
alphaev6 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
alphaev67 Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
bits
fpu Update alpha libm-test-ulps 2021-09-30 09:06:21 -03:00
nptl elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
__longjmp.S
_mcount.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
add_n.S
addmul_1.S
atomic-machine.h
bsd-_setjmp.S
bsd-setjmp.S
bzero.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
configure
configure.ac
crti.S
crtn.S
div_libc.h
div.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
divl.S
divlu.S
divq.S
divqu.S
dl-dtprocnum.h
dl-machine.h elf: Avoid nested functions in the loader [BZ #27220] 2021-10-07 11:55:02 -07:00
dl-procinfo.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
dl-procinfo.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
dl-sysdep.h
dl-tls.h
dl-trampoline.S
e_sqrtl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
elf-initfini.h
ffs.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ffsll.S
gccframe.h
hp-timing.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
htonl.S
htons.S
Implies
jmpbuf-offsets.h
jmpbuf-unwind.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ldiv.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ldsodefs.h
libc-tls.c
lldiv.S
local-soft-fp.h
lshift.S
machine-gmon.h
Makefile Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memchr.c
memset.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
memusage.h
mul_1.S
nscd-types.h
ots_add.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cmp.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cmpe.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cvtqux.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cvtqx.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cvttx.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cvtxq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_cvtxt.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_div.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_mul.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_nintxq.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
ots_sub.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
preconfigure
rawmemchr.S
reml.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
remlu.S
remq.S
remqu.S
rshift.S
setjmp.S
sfp-machine.h Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sotruss-lib.c
stackinfo.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
strlen.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
strncat.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
strrchr.S
stxcpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
stxncpy.S Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
sub_n.S
Subdirs
submul_1.S
tininess.h
tst-audit.h
udiv_qrnnd.S
unwind-arch.h
Versions