summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-04-14 20:01:33 +0300
committerAustin Foxley <austinf@cetoncorp.com>2010-04-14 10:53:08 -0700
commit1610762362e651f86ca284ac59a1d7ec88034e4e (patch)
treedd0950ba51eb7cd72d4f2ae67ee262d51394994b /libpthread/nptl
parentbd881300eb5380e4bd636b092b706b4b31def7fb (diff)
nptl: mark symbols with libc forwarder hidden
Add attribute_hidden to all symbols having libc forwarder. This prevents recursive self calls which would happen if libc is before libpthread in linking order: the forwarder functions would call itself via the function table, since the libpthread symbols would get overwritten with libc ones. This has not been a problem in glibc since there these symbols are marked hidden with linker version-script. Since we don't use one, we need to mark these explicitly. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/cleanup_defer_compat.c2
-rw-r--r--libpthread/nptl/init.c4
-rw-r--r--libpthread/nptl/pt-cleanup.c1
-rw-r--r--libpthread/nptl/pthread_attr_destroy.c1
-rw-r--r--libpthread/nptl/pthread_attr_getdetachstate.c1
-rw-r--r--libpthread/nptl/pthread_attr_getinheritsched.c1
-rw-r--r--libpthread/nptl/pthread_attr_getschedparam.c1
-rw-r--r--libpthread/nptl/pthread_attr_getschedpolicy.c1
-rw-r--r--libpthread/nptl/pthread_attr_getscope.c1
-rw-r--r--libpthread/nptl/pthread_attr_init.c1
-rw-r--r--libpthread/nptl/pthread_attr_setdetachstate.c1
-rw-r--r--libpthread/nptl/pthread_attr_setinheritsched.c1
-rw-r--r--libpthread/nptl/pthread_attr_setschedparam.c1
-rw-r--r--libpthread/nptl/pthread_attr_setschedpolicy.c1
-rw-r--r--libpthread/nptl/pthread_attr_setscope.c1
-rw-r--r--libpthread/nptl/pthread_cond_destroy.c1
-rw-r--r--libpthread/nptl/pthread_cond_init.c1
-rw-r--r--libpthread/nptl/pthread_condattr_destroy.c1
-rw-r--r--libpthread/nptl/pthread_condattr_init.c1
-rw-r--r--libpthread/nptl/pthread_create.c2
-rw-r--r--libpthread/nptl/pthread_equal.c1
-rw-r--r--libpthread/nptl/pthread_exit.c1
-rw-r--r--libpthread/nptl/pthread_getschedparam.c1
-rw-r--r--libpthread/nptl/pthread_getspecific.c1
-rw-r--r--libpthread/nptl/pthread_key_create.c1
-rw-r--r--libpthread/nptl/pthread_mutex_destroy.c1
-rw-r--r--libpthread/nptl/pthread_mutex_init.c1
-rw-r--r--libpthread/nptl/pthread_mutex_lock.c1
-rw-r--r--libpthread/nptl/pthread_mutex_unlock.c1
-rw-r--r--libpthread/nptl/pthread_self.c1
-rw-r--r--libpthread/nptl/pthread_setcancelstate.c1
-rw-r--r--libpthread/nptl/pthread_setcanceltype.c1
-rw-r--r--libpthread/nptl/pthread_setschedparam.c1
-rw-r--r--libpthread/nptl/pthread_setspecific.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c1
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S1
-rw-r--r--libpthread/nptl/unwind.c1
71 files changed, 73 insertions, 3 deletions
diff --git a/libpthread/nptl/cleanup_defer_compat.c b/libpthread/nptl/cleanup_defer_compat.c
index 8fd9b5415..cc6889332 100644
--- a/libpthread/nptl/cleanup_defer_compat.c
+++ b/libpthread/nptl/cleanup_defer_compat.c
@@ -21,6 +21,7 @@
void
+attribute_hidden
_pthread_cleanup_push_defer (
struct _pthread_cleanup_buffer *buffer,
void (*routine) (void *),
@@ -60,6 +61,7 @@ strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer)
void
+attribute_hidden
_pthread_cleanup_pop_restore (
struct _pthread_cleanup_buffer *buffer,
int execute)
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index b651a3e62..87c08fa2f 100644
--- a/libpthread/nptl/init.c
+++ b/libpthread/nptl/init.c
@@ -111,8 +111,8 @@ static const struct pthread_functions pthread_functions =
.ptr___pthread_key_create = __pthread_key_create_internal,
.ptr___pthread_getspecific = __pthread_getspecific_internal,
.ptr___pthread_setspecific = __pthread_setspecific_internal,
- .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
- .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
+ .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
+ .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
.ptr_nthreads = &__nptl_nthreads,
.ptr___pthread_unwind = &__pthread_unwind,
.ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,
diff --git a/libpthread/nptl/pt-cleanup.c b/libpthread/nptl/pt-cleanup.c
index f72ea26e9..619eb8b61 100644
--- a/libpthread/nptl/pt-cleanup.c
+++ b/libpthread/nptl/pt-cleanup.c
@@ -23,6 +23,7 @@
#include <jmpbuf-unwind.h>
void
+attribute_hidden
__pthread_cleanup_upto (__jmp_buf target, char *targetframe)
{
struct pthread *self = THREAD_SELF;
diff --git a/libpthread/nptl/pthread_attr_destroy.c b/libpthread/nptl/pthread_attr_destroy.c
index b8e6a374b..16b71645c 100644
--- a/libpthread/nptl/pthread_attr_destroy.c
+++ b/libpthread/nptl/pthread_attr_destroy.c
@@ -24,6 +24,7 @@
#include "pthreadP.h"
int
+attribute_hidden
__pthread_attr_destroy (
pthread_attr_t *attr)
{
diff --git a/libpthread/nptl/pthread_attr_getdetachstate.c b/libpthread/nptl/pthread_attr_getdetachstate.c
index 5f549ba2b..14b91df13 100644
--- a/libpthread/nptl/pthread_attr_getdetachstate.c
+++ b/libpthread/nptl/pthread_attr_getdetachstate.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_attr_getdetachstate (
const pthread_attr_t *attr,
int *detachstate)
diff --git a/libpthread/nptl/pthread_attr_getinheritsched.c b/libpthread/nptl/pthread_attr_getinheritsched.c
index 3ff304094..8ab8657f6 100644
--- a/libpthread/nptl/pthread_attr_getinheritsched.c
+++ b/libpthread/nptl/pthread_attr_getinheritsched.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_attr_getinheritsched (
const pthread_attr_t *attr,
int *inherit)
diff --git a/libpthread/nptl/pthread_attr_getschedparam.c b/libpthread/nptl/pthread_attr_getschedparam.c
index 82b237198..ee1d51339 100644
--- a/libpthread/nptl/pthread_attr_getschedparam.c
+++ b/libpthread/nptl/pthread_attr_getschedparam.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_attr_getschedparam (
const pthread_attr_t *attr,
struct sched_param *param)
diff --git a/libpthread/nptl/pthread_attr_getschedpolicy.c b/libpthread/nptl/pthread_attr_getschedpolicy.c
index 7b8f1deb6..54666daba 100644
--- a/libpthread/nptl/pthread_attr_getschedpolicy.c
+++ b/libpthread/nptl/pthread_attr_getschedpolicy.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_attr_getschedpolicy (
const pthread_attr_t *attr,
int *policy)
diff --git a/libpthread/nptl/pthread_attr_getscope.c b/libpthread/nptl/pthread_attr_getscope.c
index 9b05ffaea..ccbebfa43 100644
--- a/libpthread/nptl/pthread_attr_getscope.c
+++ b/libpthread/nptl/pthread_attr_getscope.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_attr_getscope (
const pthread_attr_t *attr,
int *scope)
diff --git a/libpthread/nptl/pthread_attr_init.c b/libpthread/nptl/pthread_attr_init.c
index 65ce4e5e3..d01951489 100644
--- a/libpthread/nptl/pthread_attr_init.c
+++ b/libpthread/nptl/pthread_attr_init.c
@@ -29,6 +29,7 @@ int __attr_list_lock = LLL_LOCK_INITIALIZER;
int
+attribute_hidden
__pthread_attr_init_2_1 (
pthread_attr_t *attr)
{
diff --git a/libpthread/nptl/pthread_attr_setdetachstate.c b/libpthread/nptl/pthread_attr_setdetachstate.c
index b6d9bb52e..d72fd8360 100644
--- a/libpthread/nptl/pthread_attr_setdetachstate.c
+++ b/libpthread/nptl/pthread_attr_setdetachstate.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
{
struct pthread_attr *iattr;
diff --git a/libpthread/nptl/pthread_attr_setinheritsched.c b/libpthread/nptl/pthread_attr_setinheritsched.c
index 9d0234aaa..d340df2d9 100644
--- a/libpthread/nptl/pthread_attr_setinheritsched.c
+++ b/libpthread/nptl/pthread_attr_setinheritsched.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_attr_setinheritsched (
pthread_attr_t *attr,
int inherit)
diff --git a/libpthread/nptl/pthread_attr_setschedparam.c b/libpthread/nptl/pthread_attr_setschedparam.c
index 741e641a6..aa7140060 100644
--- a/libpthread/nptl/pthread_attr_setschedparam.c
+++ b/libpthread/nptl/pthread_attr_setschedparam.c
@@ -24,6 +24,7 @@
int
+attribute_hidden
__pthread_attr_setschedparam (
pthread_attr_t *attr,
const struct sched_param *param)
diff --git a/libpthread/nptl/pthread_attr_setschedpolicy.c b/libpthread/nptl/pthread_attr_setschedpolicy.c
index 1d87b53c0..055890b41 100644
--- a/libpthread/nptl/pthread_attr_setschedpolicy.c
+++ b/libpthread/nptl/pthread_attr_setschedpolicy.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_attr_setschedpolicy (
pthread_attr_t *attr,
int policy)
diff --git a/libpthread/nptl/pthread_attr_setscope.c b/libpthread/nptl/pthread_attr_setscope.c
index cc4e46708..8155bead8 100644
--- a/libpthread/nptl/pthread_attr_setscope.c
+++ b/libpthread/nptl/pthread_attr_setscope.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_attr_setscope (
pthread_attr_t *attr,
int scope)
diff --git a/libpthread/nptl/pthread_cond_destroy.c b/libpthread/nptl/pthread_cond_destroy.c
index b67b53506..6f13d97a4 100644
--- a/libpthread/nptl/pthread_cond_destroy.c
+++ b/libpthread/nptl/pthread_cond_destroy.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_cond_destroy (
pthread_cond_t *cond)
{
diff --git a/libpthread/nptl/pthread_cond_init.c b/libpthread/nptl/pthread_cond_init.c
index dec644465..e7a18e454 100644
--- a/libpthread/nptl/pthread_cond_init.c
+++ b/libpthread/nptl/pthread_cond_init.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_cond_init (
pthread_cond_t *cond,
const pthread_condattr_t *cond_attr)
diff --git a/libpthread/nptl/pthread_condattr_destroy.c b/libpthread/nptl/pthread_condattr_destroy.c
index bdb644152..b0da06094 100644
--- a/libpthread/nptl/pthread_condattr_destroy.c
+++ b/libpthread/nptl/pthread_condattr_destroy.c
@@ -21,6 +21,7 @@
int
+attribute_hidden
__pthread_condattr_destroy (pthread_condattr_t *attr)
{
/* Nothing to be done. */
diff --git a/libpthread/nptl/pthread_condattr_init.c b/libpthread/nptl/pthread_condattr_init.c
index d22ca1e1d..05ab6a2b4 100644
--- a/libpthread/nptl/pthread_condattr_init.c
+++ b/libpthread/nptl/pthread_condattr_init.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_condattr_init (pthread_condattr_t *attr)
{
memset (attr, '\0', sizeof (*attr));
diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c
index 8b53cb199..0825873af 100644
--- a/libpthread/nptl/pthread_create.c
+++ b/libpthread/nptl/pthread_create.c
@@ -44,7 +44,7 @@ static td_thr_events_t __nptl_threads_events __attribute_used__;
static struct pthread *__nptl_last_event __attribute_used__;
/* Number of threads running. */
-unsigned int __nptl_nthreads = 1;
+unsigned int attribute_hidden __nptl_nthreads = 1;
/* Code to allocate and deallocate a stack. */
diff --git a/libpthread/nptl/pthread_equal.c b/libpthread/nptl/pthread_equal.c
index 8587e0f52..4c9a24caf 100644
--- a/libpthread/nptl/pthread_equal.c
+++ b/libpthread/nptl/pthread_equal.c
@@ -21,6 +21,7 @@
int
+attribute_hidden
__pthread_equal (pthread_t thread1, pthread_t thread2)
{
return thread1 == thread2;
diff --git a/libpthread/nptl/pthread_exit.c b/libpthread/nptl/pthread_exit.c
index a8c92fd29..de43cb886 100644
--- a/libpthread/nptl/pthread_exit.c
+++ b/libpthread/nptl/pthread_exit.c
@@ -22,6 +22,7 @@
void
+attribute_hidden
__pthread_exit (void* value)
{
THREAD_SETMEM (THREAD_SELF, result, value);
diff --git a/libpthread/nptl/pthread_getschedparam.c b/libpthread/nptl/pthread_getschedparam.c
index bb5f0a97e..9c6ea27ec 100644
--- a/libpthread/nptl/pthread_getschedparam.c
+++ b/libpthread/nptl/pthread_getschedparam.c
@@ -24,6 +24,7 @@
int
+attribute_hidden
__pthread_getschedparam (
pthread_t threadid,
int *policy,
diff --git a/libpthread/nptl/pthread_getspecific.c b/libpthread/nptl/pthread_getspecific.c
index 62c48fe8e..183595c67 100644
--- a/libpthread/nptl/pthread_getspecific.c
+++ b/libpthread/nptl/pthread_getspecific.c
@@ -22,6 +22,7 @@
void *
+attribute_hidden
__pthread_getspecific (pthread_key_t key)
{
struct pthread_key_data *data;
diff --git a/libpthread/nptl/pthread_key_create.c b/libpthread/nptl/pthread_key_create.c
index 3744c08ad..21f60ad60 100644
--- a/libpthread/nptl/pthread_key_create.c
+++ b/libpthread/nptl/pthread_key_create.c
@@ -23,6 +23,7 @@
int
+attribute_hidden
__pthread_key_create (
pthread_key_t *key,
void (*destr) (void *))
diff --git a/libpthread/nptl/pthread_mutex_destroy.c b/libpthread/nptl/pthread_mutex_destroy.c
index f487d617a..5207433ef 100644
--- a/libpthread/nptl/pthread_mutex_destroy.c
+++ b/libpthread/nptl/pthread_mutex_destroy.c
@@ -22,6 +22,7 @@
int
+attribute_hidden
__pthread_mutex_destroy (
pthread_mutex_t *mutex)
{
diff --git a/libpthread/nptl/pthread_mutex_init.c b/libpthread/nptl/pthread_mutex_init.c
index dd6e6d6fe..fee82cc5b 100644
--- a/libpthread/nptl/pthread_mutex_init.c
+++ b/libpthread/nptl/pthread_mutex_init.c
@@ -37,6 +37,7 @@ static int tpi_supported;
int
+attribute_hidden
__pthread_mutex_init (
pthread_mutex_t *mutex,
const pthread_mutexattr_t *mutexattr)
diff --git a/libpthread/nptl/pthread_mutex_lock.c b/libpthread/nptl/pthread_mutex_lock.c
index 47e4d4158..d00e13546 100644
--- a/libpthread/nptl/pthread_mutex_lock.c
+++ b/libpthread/nptl/pthread_mutex_lock.c
@@ -42,6 +42,7 @@ static int __pthread_mutex_lock_full (pthread_mutex_t *mutex)
int
+attribute_hidden
__pthread_mutex_lock (
pthread_mutex_t *mutex)
{
diff --git a/libpthread/nptl/pthread_mutex_unlock.c b/libpthread/nptl/pthread_mutex_unlock.c
index f164cde3a..15a5d1da9 100644
--- a/libpthread/nptl/pthread_mutex_unlock.c
+++ b/libpthread/nptl/pthread_mutex_unlock.c
@@ -284,6 +284,7 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr)
int
+attribute_hidden
__pthread_mutex_unlock (
pthread_mutex_t *mutex)
{
diff --git a/libpthread/nptl/pthread_self.c b/libpthread/nptl/pthread_self.c
index f0e3b3f98..61cb2a7be 100644
--- a/