diff options
author | kib <kib@FreeBSD.org> | 2014-08-29 09:29:10 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-29 09:29:10 +0000 |
commit | c51525766a3c99d4f94f5933c7ec5d897131b048 (patch) | |
tree | 238a29587db0248137a896568b184c9b00397ce0 /libexec/rtld-elf/sparc64/reloc.c | |
parent | ece271f9c965d80e212b6848db0c2ad971d20948 (diff) | |
download | FreeBSD-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/sparc64/reloc.c')
-rw-r--r-- | libexec/rtld-elf/sparc64/reloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index 21fae5c..738a847 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -300,6 +300,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(). |