aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/i386')
-rw-r--r--linuxthreads/sysdeps/i386/Makefile4
-rw-r--r--linuxthreads/sysdeps/i386/tcb-offsets.sym7
-rw-r--r--linuxthreads/sysdeps/i386/tls.h6
3 files changed, 13 insertions, 4 deletions
diff --git a/linuxthreads/sysdeps/i386/Makefile b/linuxthreads/sysdeps/i386/Makefile
index d6c3514196..b0051fbdd7 100644
--- a/linuxthreads/sysdeps/i386/Makefile
+++ b/linuxthreads/sysdeps/i386/Makefile
@@ -16,3 +16,7 @@ CFLAGS-ptlongjmp.c += -fno-omit-frame-pointer
CFLAGS-semaphore.c += -fno-omit-frame-pointer
CFLAGS-sighandler.c += -fno-omit-frame-pointer
endif
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/linuxthreads/sysdeps/i386/tcb-offsets.sym b/linuxthreads/sysdeps/i386/tcb-offsets.sym
new file mode 100644
index 0000000000..69a5018d88
--- /dev/null
+++ b/linuxthreads/sysdeps/i386/tcb-offsets.sym
@@ -0,0 +1,7 @@
+#include <sysdep.h>
+#include <tls.h>
+
+MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
+#ifdef NEED_DL_SYSINFO
+SYSINFO_OFFSET offsetof (tcbhead_t, sysinfo)
+#endif
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index 761a8ca943..216ba554f6 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -46,11 +46,9 @@ typedef struct
uintptr_t sysinfo;
#endif
} tcbhead_t;
-#endif
-#ifdef NEED_DL_SYSINFO
-/* Offset of the SYSINFO element in tcbhead_t. */
-# define SYSINFO_OFFSET 24
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
#endif
/* We can support TLS only if the floating-stack support is available.