summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.h
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/rtld.h
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/rtld.h')
-rw-r--r--libexec/rtld-elf/rtld.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index cbeff66..a0f24cc 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -293,6 +293,8 @@ typedef struct Struct_Obj_Entry {
#define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by
dlsym. */
#define SYMLOOK_EARLY 0x04 /* Symlook is done during initialization. */
+#define SYMLOOK_IFUNC 0x08 /* Allow IFUNC processing in
+ reloc_non_plt(). */
/* Flags for load_object(). */
#define RTLD_LO_NOLOAD 0x01 /* dlopen() specified RTLD_NOLOAD. */
OpenPOWER on IntegriCloud