mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Prevent dead code elimination for the TP assignmient by using inline
assembly.
This commit is contained in:
parent
1b980732bb
commit
7d3f85133a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161728
@ -29,7 +29,6 @@
|
||||
void
|
||||
_set_tp(void *tpval)
|
||||
{
|
||||
register void* tp __asm__("r13");
|
||||
|
||||
tp = tpval;
|
||||
__asm __volatile("mov r13 = %0" :: "r"(tpval));
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ init_pltgot(Obj_Entry *obj)
|
||||
void
|
||||
allocate_initial_tls(Obj_Entry *list)
|
||||
{
|
||||
register Elf_Addr** tp __asm__("r13");
|
||||
void *tpval;
|
||||
|
||||
/*
|
||||
* Fix the size of the static TLS block by using the maximum
|
||||
@ -603,7 +603,8 @@ allocate_initial_tls(Obj_Entry *list)
|
||||
*/
|
||||
tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA;
|
||||
|
||||
tp = allocate_tls(list, 0, 16, 16);
|
||||
tpval = allocate_tls(list, 0, 16, 16);
|
||||
__asm __volatile("mov r13 = %0" :: "r"(tpval));
|
||||
}
|
||||
|
||||
void *__tls_get_addr(unsigned long module, unsigned long offset)
|
||||
|
Loading…
Reference in New Issue
Block a user