summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/mips/reloc.c
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2012-03-06 03:27:08 +0000
committergonzo <gonzo@FreeBSD.org>2012-03-06 03:27:08 +0000
commitf348ee84f4c3f04d015cb8fc440e7d72cf4ef541 (patch)
tree2b8786bca766de10cd77df9fce683200be25936a /libexec/rtld-elf/mips/reloc.c
parentc6be4f4d2d1b71c04de5d3bbb6933ce2dbcdb317 (diff)
downloadFreeBSD-src-f348ee84f4c3f04d015cb8fc440e7d72cf4ef541.zip
FreeBSD-src-f348ee84f4c3f04d015cb8fc440e7d72cf4ef541.tar.gz
- Switch to saving non-offseted pointer to TLS block in order too keep things simple
Diffstat (limited to 'libexec/rtld-elf/mips/reloc.c')
-rw-r--r--libexec/rtld-elf/mips/reloc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libexec/rtld-elf/mips/reloc.c b/libexec/rtld-elf/mips/reloc.c
index 7b520c9..fd108f9 100644
--- a/libexec/rtld-elf/mips/reloc.c
+++ b/libexec/rtld-elf/mips/reloc.c
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
#include <inttypes.h>
#include <machine/sysarch.h>
+#include <machine/tls.h>
#include "debug.h"
#include "rtld.h"
@@ -622,8 +623,7 @@ allocate_initial_tls(Obj_Entry *objs)
*/
tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA;
- tls = ((char *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8)
- + TLS_TP_OFFSET + TLS_TCB_SIZE);
+ tls = (char *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8);
sysarch(MIPS_SET_TLS, tls);
}
@@ -636,8 +636,7 @@ __tls_get_addr(tls_index* ti)
sysarch(MIPS_GET_TLS, &tls);
- p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tls - TLS_TP_OFFSET
- - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset + TLS_DTP_OFFSET);
+ p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset + TLS_DTP_OFFSET);
return (p);
}
OpenPOWER on IntegriCloud