summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/sparc64/rtld_machdep.h
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2004-08-03 08:51:00 +0000
committerdfr <dfr@FreeBSD.org>2004-08-03 08:51:00 +0000
commit4e9853427fa3cd90808fd8369e917f588b1ee5c0 (patch)
tree5493edb6b3a69f88f4154145f1edf0879595204f /libexec/rtld-elf/sparc64/rtld_machdep.h
parent5a48e6bc9fa5e4eb90bf8dc018ec35469df1d4ea (diff)
downloadFreeBSD-src-4e9853427fa3cd90808fd8369e917f588b1ee5c0.zip
FreeBSD-src-4e9853427fa3cd90808fd8369e917f588b1ee5c0.tar.gz
Add support for Thread Local Storage.
Diffstat (limited to 'libexec/rtld-elf/sparc64/rtld_machdep.h')
-rw-r--r--libexec/rtld-elf/sparc64/rtld_machdep.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libexec/rtld-elf/sparc64/rtld_machdep.h b/libexec/rtld-elf/sparc64/rtld_machdep.h
index 27276ee..db2ce25 100644
--- a/libexec/rtld-elf/sparc64/rtld_machdep.h
+++ b/libexec/rtld-elf/sparc64/rtld_machdep.h
@@ -52,4 +52,19 @@ Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr,
#define call_initfini_pointer(obj, target) \
(((InitFunc)(target))())
+#define round(size, align) \
+ (((size) + (align) - 1) & ~((align) - 1))
+#define calculate_first_tls_offset(size, align) \
+ round(size, align)
+#define calculate_tls_offset(prev_offset, prev_size, size, align) \
+ round((prev_offset) + (size), align)
+#define calculate_tls_end(off, size) ((off) + (size))
+
+typedef struct {
+ unsigned long ti_module;
+ unsigned long ti_offset;
+} tls_index;
+
+extern void *__tls_get_addr(tls_index *ti);
+
#endif
OpenPOWER on IntegriCloud