diff options
author | kib <kib@FreeBSD.org> | 2016-11-23 17:48:43 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-11-23 17:48:43 +0000 |
commit | 9ef73b375eb639d0ca5e6fe029a6aed4bf092ca6 (patch) | |
tree | a18aab4ed7ad8e0389d6779e328cfde735de1868 /libexec/rtld-elf/sparc64 | |
parent | 7cd55eaa0f37289e264d9325cb65d7b221badb56 (diff) | |
download | FreeBSD-src-9ef73b375eb639d0ca5e6fe029a6aed4bf092ca6.zip FreeBSD-src-9ef73b375eb639d0ca5e6fe029a6aed4bf092ca6.tar.gz |
MFC r308689:
Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and
CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the
ifunc resolvers on x86.
MFC r308925:
Adjust r308689 to make rtld compilable with either in-tree or
(hopefully) stock gcc 4.2.1 on i386 and other arches.
Diffstat (limited to 'libexec/rtld-elf/sparc64')
-rw-r--r-- | libexec/rtld-elf/sparc64/reloc.c | 5 | ||||
-rw-r--r-- | libexec/rtld-elf/sparc64/rtld_machdep.h | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index 242fb8e..ab16879 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -786,6 +786,11 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj, return (target); } +void +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) +{ +} + /* * Install rtld function call into this PLT slot. */ diff --git a/libexec/rtld-elf/sparc64/rtld_machdep.h b/libexec/rtld-elf/sparc64/rtld_machdep.h index 44fe2cf..45e0202 100644 --- a/libexec/rtld-elf/sparc64/rtld_machdep.h +++ b/libexec/rtld-elf/sparc64/rtld_machdep.h @@ -53,7 +53,10 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr, #define call_init_pointer(obj, target) \ (((InitArrFunc)(target))(main_argc, main_argv, environ)) -#define round(size, align) \ +#define call_ifunc_resolver(ptr) \ + (((Elf_Addr (*)(void))ptr)()) + +#define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) #define calculate_first_tls_offset(size, align) \ round(size, align) |