aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc64/dl-machine.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-29 16:37:58 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-29 16:37:58 +0100
commit6029860f6fb465ac35c68c71e3899b9b872b6b26 (patch)
treeea9df4b6c0c1d30b02b9f08077498b723466bac6 /sysdeps/sparc/sparc64/dl-machine.h
parenta331150af65477fc3fa72ab341eed5e0b2daf7f3 (diff)
downloadglibc-fw/bug24214.tar
glibc-fw/bug24214.tar.gz
glibc-fw/bug24214.tar.bz2
glibc-fw/bug24214.zip
elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214]fw/bug24214
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. Tested on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, s390-linux-gnu, s390x-linux-gnu, powerpc64le-linux-gnu. Built with build-many-glibcs.py.
Diffstat (limited to 'sysdeps/sparc/sparc64/dl-machine.h')
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h6
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