summaryrefslogtreecommitdiff
path: root/sysdeps/s390/dl-tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390/dl-tls.h')
-rw-r--r--sysdeps/s390/dl-tls.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sysdeps/s390/dl-tls.h b/sysdeps/s390/dl-tls.h
index 4801bf8622..8132b10ab5 100644
--- a/sysdeps/s390/dl-tls.h
+++ b/sysdeps/s390/dl-tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. s390 version.
- Copyright (C) 2003-2014 Free Software Foundation, Inc.
+ Copyright (C) 2003-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,10 +29,17 @@ typedef struct
extern unsigned long __tls_get_offset (unsigned long got_offset);
-# ifdef IS_IN_rtld
+# if IS_IN (rtld)
# include <shlib-compat.h>
+/* dl-tls.c declares __tls_get_addr as an exported symbol if it is not defined
+ as a macro. It seems suitable to do that in the generic code because all
+ architectures other than s390 export __tls_get_addr. The declaration causes
+ problems in s390 though, so we define __tls_get_addr here to avoid declaring
+ __tls_get_addr again. */
+# define __tls_get_addr __tls_get_addr
+
extern void *__tls_get_addr (tls_index *ti) attribute_hidden;
/* Make a temporary alias of __tls_get_addr to remove the hidden
attribute. Then export __tls_get_addr as __tls_get_addr_internal
@@ -78,9 +85,9 @@ __tls_get_offset:\n\
1: .long __tls_get_addr - 0b\n\
");
# endif
-# else /* IS_IN_rtld */
+# else /* IS_IN (rtld) */
extern void *__tls_get_addr_internal (tls_index *ti);
-# endif /* !IS_IN_rtld */
+# endif /* !IS_IN (rtld) */
# define GET_ADDR_OFFSET \
(ti->ti_offset - (unsigned long) __builtin_thread_pointer ())