Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102849280
D33047.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33047.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D33047: rtld-elf: Use _get_tp in __tls_get_addr for aarch64 and riscv64.
Attached
Detach File
Event Timeline
Log In to Comment