summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch2
-rw-r--r--libpthread/nptl/sysdeps/xtensa/dl-tls.h33
2 files changed, 26 insertions, 9 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
index 6f1734871..a3719a3fb 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
@@ -9,3 +9,5 @@ CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
ASFLAGS-syscall.S = -D_LIBC_REENTRANT
ASFLAGS-mmap.S = -D_LIBC_REENTRANT
+
+ASFLAGS += -DUSE___THREAD
diff --git a/libpthread/nptl/sysdeps/xtensa/dl-tls.h b/libpthread/nptl/sysdeps/xtensa/dl-tls.h
index adc02d74a..5fc4ea2d0 100644
--- a/libpthread/nptl/sysdeps/xtensa/dl-tls.h
+++ b/libpthread/nptl/sysdeps/xtensa/dl-tls.h
@@ -28,6 +28,29 @@ typedef struct
extern void *__tls_get_addr (tls_index *ti);
+/* Type used as the argument in a TLS descriptor for a symbol that
+ needs dynamic TLS offsets. */
+struct tlsdesc_dynamic_arg
+{
+ tls_index tlsinfo;
+ size_t gen_count;
+};
+
+#ifdef __FDPIC__
+/* Type used to represent a TLS descriptor. */
+struct tlsdesc
+{
+ ptrdiff_t (*entry)(struct tlsdesc *);
+ void *argument;
+};
+
+extern ptrdiff_t attribute_hidden
+ _dl_tlsdesc_return(struct tlsdesc *);
+
+extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset);
+extern ptrdiff_t attribute_hidden
+ _dl_tlsdesc_dynamic(struct tlsdesc *);
+#else
/* Type used to represent a TLS descriptor. */
struct tlsdesc
{
@@ -39,19 +62,11 @@ struct tlsdesc
ptrdiff_t (*entry)(struct tlsdesc *);
};
-/* Type used as the argument in a TLS descriptor for a symbol that
- needs dynamic TLS offsets. */
-struct tlsdesc_dynamic_arg
-{
- tls_index tlsinfo;
- size_t gen_count;
-};
-
extern ptrdiff_t attribute_hidden
_dl_tlsdesc_return(struct tlsdesc_dynamic_arg *);
extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset);
extern ptrdiff_t attribute_hidden
_dl_tlsdesc_dynamic(struct tlsdesc_dynamic_arg *);
-
+#endif
#endif