Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147620152
D50594.1783907567.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50594.1783907567.diff
View Options
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -418,7 +418,7 @@
void *tls_get_addr_common(struct tcb *tcb, int index, size_t offset);
void *allocate_tls(Obj_Entry *, void *, size_t, size_t);
void free_tls(void *, size_t, size_t);
-void *allocate_module_tls(int index);
+void *allocate_module_tls(struct tcb *tcb, int index);
bool allocate_tls_offset(Obj_Entry *obj);
void free_tls_offset(Obj_Entry *obj);
const Ver_Entry *fetch_ventry(const Obj_Entry *obj, unsigned long);
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -5380,7 +5380,7 @@
wlock_acquire(rtld_bind_lock, &lockstate);
if (!dtv->dtv_slots[index - 1].dtvs_tls)
dtv->dtv_slots[index - 1].dtvs_tls =
- allocate_module_tls(index);
+ allocate_module_tls(tcb, index);
if (!locked)
lock_release(rtld_bind_lock, &lockstate);
}
@@ -5665,7 +5665,7 @@
* Allocate TLS block for module with given index.
*/
void *
-allocate_module_tls(int index)
+allocate_module_tls(struct tcb *tcb, int index)
{
Obj_Entry *obj;
char *p;
@@ -5683,9 +5683,9 @@
if (obj->tls_static) {
#ifdef TLS_VARIANT_I
- p = (char *)_tcb_get() + obj->tlsoffset;
+ p = (char *)tcb + obj->tlsoffset;
#else
- p = (char *)_tcb_get() - obj->tlsoffset;
+ p = (char *)tcb - obj->tlsoffset;
#endif
return (p);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 13, 1:52 AM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29103396
Default Alt Text
D50594.1783907567.diff (1 KB)
Attached To
Mode
D50594: rtld-elf: Pass TCB to allocate_module_tls to avoid re-getting
Attached
Detach File
Event Timeline
Log In to Comment