glibc/sysdeps/aarch64
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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
multiarch aarch64: Disable A64FX memcpy/memmove BTI unconditionally 2021-09-24 13:26:59 +01:00
nptl elf: Remove THREAD_GSCOPE_IN_TCB 2021-09-16 01:04:20 +02:00
sys 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
__mtag_tag_region.S aarch64: Optimize __libc_mtag_tag_region 2021-03-26 11:03:06 +00:00
__mtag_tag_zero_region.S aarch64: Optimize __libc_mtag_tag_zero_region 2021-03-26 11:03:06 +00:00
abort-instr.h Relocate AArch64 from ports to libc. 2014-02-11 11:36:00 +00:00
atomic-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-_setjmp.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
bsd-setjmp.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
configure config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01:00
configure.ac config: Added HAVE_AARCH64_SVE_ASM for aarch64 2021-05-26 12:01:06 +01: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-bti.c 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-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-link.sym Relocate AArch64 from ports to libc. 2014-02-11 11:36:00 +00:00
dl-lookupcfg.h aarch64: free tlsdesc data on dlclose [BZ #27403] 2021-04-06 14:35:05 +01:00
dl-machine.h elf: Avoid nested functions in the loader [BZ #27220] 2021-10-07 11:55:02 -07:00
dl-prop.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-sysdep.h 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-tlsdesc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tlsdesc.S aarch64: push the set of rules before falling into slow path 2021-01-05 09:25:19 +00:00
dl-trampoline.S 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
e_sqrtl.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
elf-initfini.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hp-timing.h AArch64: Add hp-timing.h 2021-07-01 15:42:05 +01:00
Implies Remove dbl-64/wordsize-64 (part 2) 2021-01-07 15:26:26 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-mtag.h aarch64: inline __libc_mtag_new_tag 2021-03-26 11:03:06 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libm-test-ulps aarch64: update libm test ulps 2021-10-05 13:44:27 +01:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
linkmap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile glibc.malloc.check: Wean away from malloc hooks 2021-07-22 18:38:08 +05:30
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mcount.c 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.c aarch64: Rename place holder .S files to .c 2020-07-08 15:02:37 +01:00
memrchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memset-reg.h 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
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure Remove relro configure test. 2014-06-27 16:51:22 +00:00
rawmemchr.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
sfp-machine.h Break more lines before not after operators. 2019-02-25 13:19:19 +00: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
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
strchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strchrnul.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
string_private.h 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
strnlen.S AArch64: Improve strnlen performance 2021-07-01 15:32:36 +01:00
strrchr.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI 2021-05-26 12:01:06 +01:00
tlsdesc.c elf: Remove lazy tlsdesc relocation related code 2021-04-21 14:35:53 +01:00
tlsdesc.sym aarch64: Use explicit offsets in _dl_tlsdesc_dynamic 2016-12-02 16:52:57 +01:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ifunc-arg-1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-ifunc-arg-2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs-mod.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-vpcs.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions Relocate AArch64 from ports to libc. 2014-02-11 11:36:00 +00:00