Page MenuHomeFreeBSD

D33047.id.diff
No OneTemporary

D33047.id.diff

diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c
--- a/libexec/rtld-elf/aarch64/reloc.c
+++ b/libexec/rtld-elf/aarch64/reloc.c
@@ -534,11 +534,8 @@
void *
__tls_get_addr(tls_index* ti)
{
- char *p;
- void *_tp;
+ Elf_Addr **dtvp;
- __asm __volatile("mrs %0, tpidr_el0" : "=r" (_tp));
- p = tls_get_addr_common((Elf_Addr **)(_tp), ti->ti_module, ti->ti_offset);
-
- return (p);
+ dtvp = _get_tp();
+ return (tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset));
}
diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c
--- a/libexec/rtld-elf/riscv/reloc.c
+++ b/libexec/rtld-elf/riscv/reloc.c
@@ -406,13 +406,11 @@
void *
__tls_get_addr(tls_index* ti)
{
- char *_tp;
+ Elf_Addr **dtvp;
void *p;
- __asm __volatile("mv %0, tp" : "=r" (_tp));
-
- p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)_tp - TLS_TP_OFFSET
- - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset);
+ dtvp = _get_tp();
+ p = tls_get_addr_common(dtvp, ti->ti_module, ti->ti_offset);
return ((char*)p + TLS_DTV_OFFSET);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 11:28 PM (5 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14706484
Default Alt Text
D33047.id.diff (1 KB)

Event Timeline