Page MenuHomeFreeBSD

D9180.diff
No OneTemporary

D9180.diff

Index: head/libexec/rtld-elf/amd64/rtld_machdep.h
===================================================================
--- head/libexec/rtld-elf/amd64/rtld_machdep.h
+++ head/libexec/rtld-elf/amd64/rtld_machdep.h
@@ -35,8 +35,8 @@
struct Struct_Obj_Entry;
/* Return the address of the .dynamic section in the dynamic linker. */
-#define rtld_dynamic(obj) \
- ((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC))
+Elf_Dyn *rtld_dynamic_addr(void);
+#define rtld_dynamic(obj) rtld_dynamic_addr()
/* Fixup the jump slot at "where" to transfer control to "target". */
static inline Elf_Addr
Index: head/libexec/rtld-elf/amd64/rtld_start.S
===================================================================
--- head/libexec/rtld-elf/amd64/rtld_start.S
+++ head/libexec/rtld-elf/amd64/rtld_start.S
@@ -156,4 +156,16 @@
.cfi_endproc
.size _rtld_bind_start, . - _rtld_bind_start
+ .align 4
+ .globl rtld_dynamic_addr
+ .type rtld_dynamic_addr,@function
+rtld_dynamic_addr:
+ .cfi_startproc
+ .weak _DYNAMIC
+ .hidden _DYNAMIC
+ lea _DYNAMIC(%rip),%rax
+ ret
+ .cfi_endproc
+ .size rtld_dynamic_addr, . - rtld_dynamic_addr
+
.section .note.GNU-stack,"",%progbits

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 1:35 AM (17 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15536991
Default Alt Text
D9180.diff (1 KB)

Event Timeline