From 4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 29 Nov 2019 17:55:22 +0100 Subject: elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] This commit adds missing skip_ifunc checks to aarch64, arm, i386, sparc, and x86_64. A new test case ensures that IRELATIVE IFUNC resolvers do not run in various diagnostic modes of the dynamic loader. Reviewed-By: Szabolcs Nagy --- sysdeps/aarch64/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/aarch64') diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h index 10b91c33ae..bf6b9d0e7d 100644 --- a/sysdeps/aarch64/dl-machine.h +++ b/sysdeps/aarch64/dl-machine.h @@ -358,7 +358,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, case AARCH64_R(IRELATIVE): value = map->l_addr + reloc->r_addend; - value = elf_ifunc_invoke (value); + if (__glibc_likely (!skip_ifunc)) + value = elf_ifunc_invoke (value); *reloc_addr = value; break; -- cgit v1.2.1