summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/powerpc
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-08-29 09:29:10 +0000
committerkib <kib@FreeBSD.org>2014-08-29 09:29:10 +0000
commitc51525766a3c99d4f94f5933c7ec5d897131b048 (patch)
tree238a29587db0248137a896568b184c9b00397ce0 /libexec/rtld-elf/powerpc
parentece271f9c965d80e212b6848db0c2ad971d20948 (diff)
downloadFreeBSD-src-c51525766a3c99d4f94f5933c7ec5d897131b048.zip
FreeBSD-src-c51525766a3c99d4f94f5933c7ec5d897131b048.tar.gz
IFUNC symbol type shall be processed for non-PLT relocations,
e.g. when a global variable is initialized with a pointer to ifunc. Add symbol type check and call resolver for STT_GNU_IFUNC symbol types when processing non-PLT relocations, but only after non-IFUNC relocations are done. The two-phase proceessing is required since resolvers may reference other symbols, which must be ready to use when resolver calls are done. Restructure reloc_non_plt() on x86 to call find_symdef() and handle IFUNC in single place. For non-x86 reloc_non_plt(), check for call for IFUNC relocation and do nothing, to avoid processing relocs twice. PR: 193048 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'libexec/rtld-elf/powerpc')
-rw-r--r--libexec/rtld-elf/powerpc/reloc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c
index 838cfe6..89e5536 100644
--- a/libexec/rtld-elf/powerpc/reloc.c
+++ b/libexec/rtld-elf/powerpc/reloc.c
@@ -294,6 +294,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags,
SymCache *cache;
int r = -1;
+ if ((flags & SYMLOOK_IFUNC) != 0)
+ /* XXX not implemented */
+ return (0);
+
/*
* The dynamic loader may be called from a thread, we have
* limited amounts of stack available so we cannot use alloca().
OpenPOWER on IntegriCloud