Browse Source

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>
Timo Teräs 14 years ago
parent
commit
1610762362
71 changed files with 73 additions and 3 deletions
  1. 2 0
      libpthread/nptl/cleanup_defer_compat.c
  2. 2 2
      libpthread/nptl/init.c
  3. 1 0
      libpthread/nptl/pt-cleanup.c
  4. 1 0
      libpthread/nptl/pthread_attr_destroy.c
  5. 1 0
      libpthread/nptl/pthread_attr_getdetachstate.c
  6. 1 0
      libpthread/nptl/pthread_attr_getinheritsched.c
  7. 1 0
      libpthread/nptl/pthread_attr_getschedparam.c
  8. 1 0
      libpthread/nptl/pthread_attr_getschedpolicy.c
  9. 1 0
      libpthread/nptl/pthread_attr_getscope.c
  10. 1 0
      libpthread/nptl/pthread_attr_init.c
  11. 1 0
      libpthread/nptl/pthread_attr_setdetachstate.c
  12. 1 0
      libpthread/nptl/pthread_attr_setinheritsched.c
  13. 1 0
      libpthread/nptl/pthread_attr_setschedparam.c
  14. 1 0
      libpthread/nptl/pthread_attr_setschedpolicy.c
  15. 1 0
      libpthread/nptl/pthread_attr_setscope.c
  16. 1 0
      libpthread/nptl/pthread_cond_destroy.c
  17. 1 0
      libpthread/nptl/pthread_cond_init.c
  18. 1 0
      libpthread/nptl/pthread_condattr_destroy.c
  19. 1 0
      libpthread/nptl/pthread_condattr_init.c
  20. 1 1
      libpthread/nptl/pthread_create.c
  21. 1 0
      libpthread/nptl/pthread_equal.c
  22. 1 0
      libpthread/nptl/pthread_exit.c
  23. 1 0
      libpthread/nptl/pthread_getschedparam.c
  24. 1 0
      libpthread/nptl/pthread_getspecific.c
  25. 1 0
      libpthread/nptl/pthread_key_create.c
  26. 1 0
      libpthread/nptl/pthread_mutex_destroy.c
  27. 1 0
      libpthread/nptl/pthread_mutex_init.c
  28. 1 0
      libpthread/nptl/pthread_mutex_lock.c
  29. 1 0
      libpthread/nptl/pthread_mutex_unlock.c
  30. 1 0
      libpthread/nptl/pthread_self.c
  31. 1 0
      libpthread/nptl/pthread_setcancelstate.c
  32. 1 0
      libpthread/nptl/pthread_setcanceltype.c
  33. 1 0
      libpthread/nptl/pthread_setschedparam.c
  34. 1 0
      libpthread/nptl/pthread_setspecific.c
  35. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c
  36. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c
  37. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c
  38. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c
  39. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c
  40. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c
  41. 1 0
      libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c
  42. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c
  43. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c
  44. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
  45. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
  46. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
  47. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
  48. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
  49. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
  50. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
  51. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
  52. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c
  53. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
  54. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
  55. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
  56. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
  57. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
  58. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
  59. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
  60. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
  61. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
  62. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
  63. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
  64. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
  65. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
  66. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
  67. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
  68. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
  69. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
  70. 1 0
      libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
  71. 1 0
      libpthread/nptl/unwind.c

+ 2 - 0
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)

+ 2 - 2
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,

+ 1 - 0
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;

+ 1 - 0
libpthread/nptl/pthread_attr_destroy.c

@@ -24,6 +24,7 @@
 #include "pthreadP.h"
 
 int
+attribute_hidden
 __pthread_attr_destroy (
      pthread_attr_t *attr)
 {

+ 1 - 0
libpthread/nptl/pthread_attr_getdetachstate.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_getdetachstate (
      const pthread_attr_t *attr,
      int *detachstate)

+ 1 - 0
libpthread/nptl/pthread_attr_getinheritsched.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_getinheritsched (
      const pthread_attr_t *attr,
      int *inherit)

+ 1 - 0
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)

+ 1 - 0
libpthread/nptl/pthread_attr_getschedpolicy.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_getschedpolicy (
      const pthread_attr_t *attr,
      int *policy)

+ 1 - 0
libpthread/nptl/pthread_attr_getscope.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_getscope (
      const pthread_attr_t *attr,
      int *scope)

+ 1 - 0
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)
 {

+ 1 - 0
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;

+ 1 - 0
libpthread/nptl/pthread_attr_setinheritsched.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_setinheritsched (
      pthread_attr_t *attr,
      int inherit)

+ 1 - 0
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)

+ 1 - 0
libpthread/nptl/pthread_attr_setschedpolicy.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_setschedpolicy (
      pthread_attr_t *attr,
      int policy)

+ 1 - 0
libpthread/nptl/pthread_attr_setscope.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_attr_setscope (
      pthread_attr_t *attr,
      int scope)

+ 1 - 0
libpthread/nptl/pthread_cond_destroy.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_cond_destroy (
      pthread_cond_t *cond)
 {

+ 1 - 0
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)

+ 1 - 0
libpthread/nptl/pthread_condattr_destroy.c

@@ -21,6 +21,7 @@
 
 
 int
+attribute_hidden
 __pthread_condattr_destroy (pthread_condattr_t *attr)
 {
   /* Nothing to be done.  */

+ 1 - 0
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));

+ 1 - 1
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.  */

+ 1 - 0
libpthread/nptl/pthread_equal.c

@@ -21,6 +21,7 @@
 
 
 int
+attribute_hidden
 __pthread_equal (pthread_t thread1, pthread_t thread2)
 {
   return thread1 == thread2;

+ 1 - 0
libpthread/nptl/pthread_exit.c

@@ -22,6 +22,7 @@
 
 
 void
+attribute_hidden
 __pthread_exit (void* value)
 {
   THREAD_SETMEM (THREAD_SELF, result, value);

+ 1 - 0
libpthread/nptl/pthread_getschedparam.c

@@ -24,6 +24,7 @@
 
 
 int
+attribute_hidden
 __pthread_getschedparam (
      pthread_t threadid,
      int *policy,

+ 1 - 0
libpthread/nptl/pthread_getspecific.c

@@ -22,6 +22,7 @@
 
 
 void *
+attribute_hidden
 __pthread_getspecific (pthread_key_t key)
 {
   struct pthread_key_data *data;

+ 1 - 0
libpthread/nptl/pthread_key_create.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_key_create (
      pthread_key_t *key,
      void (*destr) (void *))

+ 1 - 0
libpthread/nptl/pthread_mutex_destroy.c

@@ -22,6 +22,7 @@
 
 
 int
+attribute_hidden
 __pthread_mutex_destroy (
      pthread_mutex_t *mutex)
 {

+ 1 - 0
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)

+ 1 - 0
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)
 {

+ 1 - 0
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)
 {

+ 1 - 0
libpthread/nptl/pthread_self.c

@@ -22,6 +22,7 @@
 
 
 pthread_t
+attribute_hidden
 __pthread_self (void)
 {
   return (pthread_t) THREAD_SELF;

+ 1 - 0
libpthread/nptl/pthread_setcancelstate.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_setcancelstate (
      int state,
      int *oldstate)

+ 1 - 0
libpthread/nptl/pthread_setcanceltype.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_setcanceltype (
      int type,
      int *oldtype)

+ 1 - 0
libpthread/nptl/pthread_setschedparam.c

@@ -25,6 +25,7 @@
 
 
 int
+attribute_hidden
 __pthread_setschedparam (
      pthread_t threadid,
      int policy,

+ 1 - 0
libpthread/nptl/pthread_setspecific.c

@@ -23,6 +23,7 @@
 
 
 int
+attribute_hidden
 __pthread_setspecific (
      pthread_key_t key,
      const void *value)

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c

@@ -28,6 +28,7 @@
 
 
 int
+attribute_hidden
 __pthread_cond_broadcast (
      pthread_cond_t *cond)
 {

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c

@@ -28,6 +28,7 @@
 
 
 int
+attribute_hidden
 __pthread_cond_signal (
      pthread_cond_t *cond)
 {

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c

@@ -39,6 +39,7 @@ struct _condvar_cleanup_buffer
 };
 
 int
+attribute_hidden
 __pthread_cond_timedwait (
      pthread_cond_t *cond,
      pthread_mutex_t *mutex,

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c

@@ -89,6 +89,7 @@ __condvar_cleanup (void *arg)
 
 
 int
+attribute_hidden
 __pthread_cond_wait (
      pthread_cond_t *cond,
      pthread_mutex_t *mutex)

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c

@@ -26,6 +26,7 @@
 
 /* Acquire read lock for RWLOCK.  */
 int
+attribute_hidden
 __pthread_rwlock_rdlock (
      pthread_rwlock_t *rwlock)
 {

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c

@@ -25,6 +25,7 @@
 
 /* Unlock RWLOCK.  */
 int
+attribute_hidden
 __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 {
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);

+ 1 - 0
libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c

@@ -26,6 +26,7 @@
 
 /* Acquire write lock for RWLOCK.  */
 int
+attribute_hidden
 __pthread_rwlock_wrlock (
      pthread_rwlock_t *rwlock)
 {

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c

@@ -32,6 +32,7 @@ clear_once_control (void *arg)
 }
 
 int
+attribute_hidden
 __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
 {
   for (;;)

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c

@@ -31,6 +31,7 @@ clear_once_control (void *arg)
 }
 
 int
+attribute_hidden
 __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
 {
   for (;;)

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S

@@ -30,6 +30,7 @@
 	/* int pthread_cond_broadcast (pthread_cond_t *cond) */
 	.globl	__pthread_cond_broadcast
 	.type	__pthread_cond_broadcast, @function
+	.hidden	__pthread_cond_broadcast
 	.align	16
 __pthread_cond_broadcast:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S

@@ -31,6 +31,7 @@
 	/* int pthread_cond_signal (pthread_cond_t *cond) */
 	.globl	__pthread_cond_signal
 	.type	__pthread_cond_signal, @function
+	.hidden	__pthread_cond_signal
 	.align	16
 __pthread_cond_signal:
 

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S

@@ -31,6 +31,7 @@
 			       const struct timespec *abstime)  */
 	.globl	__pthread_cond_timedwait
 	.type	__pthread_cond_timedwait, @function
+	.hidden	__pthread_cond_timedwait
 	.align	16
 __pthread_cond_timedwait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S

@@ -31,6 +31,7 @@
 /* int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)  */
 	.globl	__pthread_cond_wait
 	.type	__pthread_cond_wait, @function
+	.hidden	__pthread_cond_wait
 	.align	16
 __pthread_cond_wait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_rdlock
 	.type	__pthread_rwlock_rdlock,@function
+	.hidden	__pthread_rwlock_rdlock
 	.align	16
 __pthread_rwlock_rdlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S

@@ -28,6 +28,7 @@
 
 	.globl	__pthread_rwlock_unlock
 	.type	__pthread_rwlock_unlock,@function
+	.hidden	__pthread_rwlock_unlock
 	.align	16
 __pthread_rwlock_unlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_wrlock
 	.type	__pthread_rwlock_wrlock,@function
+	.hidden	__pthread_rwlock_wrlock
 	.align	16
 __pthread_rwlock_wrlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S

@@ -31,6 +31,7 @@
 
 	.globl	__pthread_once
 	.type	__pthread_once,@function
+	.hidden	__pthread_once
 	.align	16
 	cfi_startproc
 __pthread_once:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c

@@ -35,6 +35,7 @@ clear_once_control (void *arg)
 
 
 int
+attribute_hidden
 __pthread_once (once_control, init_routine)
      pthread_once_t *once_control;
      void (*init_routine) (void);

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c

@@ -35,6 +35,7 @@ clear_once_control (void *arg)
 
 
 int
+attribute_hidden
 __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
 {
   for (;;)

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S

@@ -30,6 +30,7 @@
 	/* int pthread_cond_broadcast (pthread_cond_t *cond) */
 	.globl	__pthread_cond_broadcast
 	.type	__pthread_cond_broadcast, @function
+	.hidden	__pthread_cond_broadcast
 	.align	5
 __pthread_cond_broadcast:
 	mov.l   r10, @-r15

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S

@@ -29,6 +29,7 @@
 	/* int pthread_cond_signal (pthread_cond_t *cond) */
 	.globl	__pthread_cond_signal
 	.type	__pthread_cond_signal, @function
+	.hidden	__pthread_cond_signal
 	.align	5
 __pthread_cond_signal:
 	mov.l	r8, @-r15

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S

@@ -30,6 +30,7 @@
 			       const struct timespec *abstime)  */
 	.globl	__pthread_cond_timedwait
 	.type	__pthread_cond_timedwait, @function
+	.hidden	__pthread_cond_timedwait
 	.align	5
 __pthread_cond_timedwait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S

@@ -28,6 +28,7 @@
 /* int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)  */
 	.globl	__pthread_cond_wait
 	.type	__pthread_cond_wait, @function
+	.hidden	__pthread_cond_wait
 	.align	5
 __pthread_cond_wait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S

@@ -29,6 +29,7 @@
 	.text
 	.globl	__pthread_once
 	.type	__pthread_once,@function
+	.hidden	__pthread_once
 	.align	5
 	cfi_startproc
 __pthread_once:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_rdlock
 	.type	__pthread_rwlock_rdlock,@function
+	.hidden	__pthread_rwlock_rdlock
 	.align	5
 __pthread_rwlock_rdlock:
 	mov.l	r12, @-r15

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S

@@ -28,6 +28,7 @@
 
 	.globl	__pthread_rwlock_unlock
 	.type	__pthread_rwlock_unlock,@function
+	.hidden	__pthread_rwlock_unlock
 	.align	5
 __pthread_rwlock_unlock:
 	mov.l	r12, @-r15

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_wrlock
 	.type	__pthread_rwlock_wrlock,@function
+	.hidden	__pthread_rwlock_wrlock
 	.align	5
 __pthread_rwlock_wrlock:
 	mov.l	r12, @-r15

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c

@@ -35,6 +35,7 @@ clear_once_control (void *arg)
 
 
 int
+attribute_hidden
 __pthread_once (once_control, init_routine)
      pthread_once_t *once_control;
      void (*init_routine) (void);

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S

@@ -31,6 +31,7 @@
 	/* int pthread_cond_broadcast (pthread_cond_t *cond) */
 	.globl	__pthread_cond_broadcast
 	.type	__pthread_cond_broadcast, @function
+	.hidden	__pthread_cond_broadcast
 	.align	16
 __pthread_cond_broadcast:
 

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S

@@ -30,6 +30,7 @@
 	/* int pthread_cond_signal (pthread_cond_t *cond) */
 	.globl	__pthread_cond_signal
 	.type	__pthread_cond_signal, @function
+	.hidden	__pthread_cond_signal
 	.align	16
 __pthread_cond_signal:
 

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S

@@ -36,6 +36,7 @@
 			       const struct timespec *abstime)  */
 	.globl	__pthread_cond_timedwait
 	.type	__pthread_cond_timedwait, @function
+	.hidden	__pthread_cond_timedwait
 	.align	16
 __pthread_cond_timedwait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S

@@ -31,6 +31,7 @@
 /* int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)  */
 	.globl	__pthread_cond_wait
 	.type	__pthread_cond_wait, @function
+	.hidden	__pthread_cond_wait
 	.align	16
 __pthread_cond_wait:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S

@@ -30,6 +30,7 @@
 
 	.globl	__pthread_once
 	.type	__pthread_once,@function
+	.hidden	__pthread_once
 	.align	16
 __pthread_once:
 .LSTARTCODE:

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_rdlock
 	.type	__pthread_rwlock_rdlock,@function
+	.hidden	__pthread_rwlock_rdlock
 	.align	16
 __pthread_rwlock_rdlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S

@@ -27,6 +27,7 @@
 
 	.globl	__pthread_rwlock_unlock
 	.type	__pthread_rwlock_unlock,@function
+	.hidden	__pthread_rwlock_unlock
 	.align	16
 __pthread_rwlock_unlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S

@@ -29,6 +29,7 @@
 
 	.globl	__pthread_rwlock_wrlock
 	.type	__pthread_rwlock_wrlock,@function
+	.hidden	__pthread_rwlock_wrlock
 	.align	16
 __pthread_rwlock_wrlock:
 	cfi_startproc

+ 1 - 0
libpthread/nptl/unwind.c

@@ -115,6 +115,7 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
 
 
 void
+attribute_hidden
 __cleanup_fct_attribute __attribute ((noreturn))
 __pthread_unwind (__pthread_unwind_buf_t *buf)
 {