summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2006-08-30 00:39:07 +0000
committermarcel <marcel@FreeBSD.org>2006-08-30 00:39:07 +0000
commit007866fe9c5db6dfe7001acab1424b1f8d7c039a (patch)
tree93d4a447a9df386c4d2a48c59c301156878b363f /libexec/rtld-elf
parent8397e9dcdc544c081038b4bfec738c90b1961a39 (diff)
downloadFreeBSD-src-007866fe9c5db6dfe7001acab1424b1f8d7c039a.zip
FreeBSD-src-007866fe9c5db6dfe7001acab1424b1f8d7c039a.tar.gz
Prevent dead code elimination for the TP assignmient by using inline
assembly.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/ia64/reloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c
index 45f9ef5..a07aeb8 100644
--- a/libexec/rtld-elf/ia64/reloc.c
+++ b/libexec/rtld-elf/ia64/reloc.c
@@ -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)
OpenPOWER on IntegriCloud