diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-11-29 17:55:22 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-12-02 14:55:22 +0100 |
commit | 4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3 (patch) | |
tree | 8f3c89f67d8600bc928337dc226f3a107a904dc1 /sysdeps/sparc/sparc64 | |
parent | 61a7c9df71ee4e6f94b56c20f0d37c6e17d5f284 (diff) | |
download | glibc-4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3.tar glibc-4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3.tar.gz glibc-4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3.tar.bz2 glibc-4db71d2f9897c6ca7a9d0cadc1fc4067557a4eb3.zip |
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 <szabolcs.nagy@arm.com>
Diffstat (limited to 'sysdeps/sparc/sparc64')
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index ce1261d2a0..0acaf92a53 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -450,11 +450,13 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, *reloc_addr = value; break; case R_SPARC_IRELATIVE: - value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); + if (__glibc_likely (!skip_ifunc)) + value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); *reloc_addr = value; break; case R_SPARC_JMP_IREL: - value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); + if (__glibc_likely (!skip_ifunc)) + value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); /* 'high' is always zero, for large PLT entries the linker emits an R_SPARC_IRELATIVE. */ #ifdef RESOLVE_CONFLICT_FIND_MAP |