diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-10-08 02:50:34 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-10-08 02:50:34 +0000 |
commit | 3785d22822bc425cde879bea3c1758e71a30892a (patch) | |
tree | 6ad8c75d0dc911debb2ae132787ef8e5be588a57 /libexec | |
parent | e36fa6ead363211fd86ded1eefa0869c344737ba (diff) | |
download | FreeBSD-src-3785d22822bc425cde879bea3c1758e71a30892a.zip FreeBSD-src-3785d22822bc425cde879bea3c1758e71a30892a.tar.gz |
Fix TLS on sparc64 for statically and dynamically linked binaries
Approved by: rwatson (mentor)
Reviewed by: jmg and marcel
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/rtld-elf/sparc64/reloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index dc0d830..225322e 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -723,7 +723,7 @@ install_plt(Elf_Word *pltgot, Elf_Addr proc) void allocate_initial_tls(Obj_Entry *objs) { - register Elf_Addr** tp __asm__("%g7"); + Elf_Addr* tpval; /* * Fix the size of the static TLS block by using the maximum @@ -731,7 +731,8 @@ allocate_initial_tls(Obj_Entry *objs) * use. */ tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA; - tp = allocate_tls(objs, NULL, 3*sizeof(Elf_Addr), sizeof(Elf_Addr)); + tpval = allocate_tls(objs, NULL, 3*sizeof(Elf_Addr), sizeof(Elf_Addr)); + __asm __volatile("mov %0, %%g7" : : "r" (tpval)); } void *__tls_get_addr(tls_index *ti) |