[git commit master] libc: add hidden calls to pthread cleanup funcs

Mike Frysinger vapier at gentoo.org
Fri Apr 23 14:31:55 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=c7e4f11335adcdad03e24ad2648b873f116337aa
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

A lot of libc code calls the pthread cleanup funcs implicitly (for stdio)
which currently goes through the PLT.  Since we already have forwarding
symbols for these funcs, it's safe to declare the internal libc usage
hidden as a loaded libpthread will have the real symbols found.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libpthread/linuxthreads.old/forward.c              |    2 ++
 .../linuxthreads.old/sysdeps/pthread/pthread.h     |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libpthread/linuxthreads.old/forward.c b/libpthread/linuxthreads.old/forward.c
index 402b155..f5afc2f 100644
--- a/libpthread/linuxthreads.old/forward.c
+++ b/libpthread/linuxthreads.old/forward.c
@@ -165,6 +165,8 @@ FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
 
 FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
 FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
+libc_hidden_def(_pthread_cleanup_push_defer)
 
 FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
 FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
+libc_hidden_def(_pthread_cleanup_pop_restore)
diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
index 38d5667..b1dcd14 100644
--- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
+++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
@@ -642,6 +642,7 @@ extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
 extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
 					 void (*__routine) (void *),
 					 void *__arg) __THROW;
+libc_hidden_proto(_pthread_cleanup_push_defer)
 extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
 					  void (*__routine) (void *),
 					  void *__arg) __THROW;
@@ -655,6 +656,7 @@ extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buff
 
 extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
 					  int __execute) __THROW;
+libc_hidden_proto(_pthread_cleanup_pop_restore)
 extern void __pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
 					   int __execute) __THROW;
 #endif
-- 
1.6.3.3



More information about the uClibc-cvs mailing list