summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/init.c1
-rw-r--r--libpthread/nptl/pthreadP.h16
-rw-r--r--libpthread/nptl/sysdeps/generic/libc-tls.c1
-rw-r--r--libpthread/nptl/unwind.c3
4 files changed, 19 insertions, 2 deletions
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index 911293a65..c8ca09637 100644
--- a/libpthread/nptl/init.c
+++ b/libpthread/nptl/init.c
@@ -257,6 +257,7 @@ extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
/* This can be set by the debugger before initialization is complete. */
static bool __nptl_initial_report_events __attribute_used__;
+void __pthread_initialize_minimal_internal (void) attribute_hidden;
void
__pthread_initialize_minimal_internal (void)
{
diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
index fbac7d08f..fb354eaa3 100644
--- a/libpthread/nptl/pthreadP.h
+++ b/libpthread/nptl/pthreadP.h
@@ -179,7 +179,13 @@ extern struct pthread_key_struct __pthread_keys[PTHREAD_KEYS_MAX];
hidden_proto (__pthread_keys)
/* Number of threads running. */
-extern unsigned int __nptl_nthreads attribute_hidden;
+extern unsigned int __nptl_nthreads
+#ifdef SHARED
+ attribute_hidden
+#else
+ __attribute ((weak))
+#endif
+ ;
#ifndef __ASSUME_SET_ROBUST_LIST
/* Negative if we do not have the system call and we can use it. */
@@ -563,7 +569,13 @@ extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,
extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer,
int execute);
-extern void __nptl_deallocate_tsd (void) attribute_hidden;
+extern void __nptl_deallocate_tsd (void)
+#ifdef SHARED
+ attribute_hidden
+#else
+ __attribute ((weak))
+#endif
+ ;
extern int __nptl_setxid (struct xid_command *cmdp) attribute_hidden;
diff --git a/libpthread/nptl/sysdeps/generic/libc-tls.c b/libpthread/nptl/sysdeps/generic/libc-tls.c
index c45e76120..e14fc26c6 100644
--- a/libpthread/nptl/sysdeps/generic/libc-tls.c
+++ b/libpthread/nptl/sysdeps/generic/libc-tls.c
@@ -242,6 +242,7 @@ _dl_tls_setup (void)
return 0;
}
+extern void __pthread_initialize_minimal(void) __attribute__((weak));
/* This is the minimal initialization function used when libpthread is
not used. */
diff --git a/libpthread/nptl/unwind.c b/libpthread/nptl/unwind.c
index 0322a6023..8f60ae410 100644
--- a/libpthread/nptl/unwind.c
+++ b/libpthread/nptl/unwind.c
@@ -117,6 +117,9 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
void
attribute_protected
__cleanup_fct_attribute __attribute ((noreturn))
+#if !defined SHARED && !defined IS_IN_LIBPTHREAD
+weak_function
+#endif
__pthread_unwind (__pthread_unwind_buf_t *buf)
{
struct pthread_unwind_buf *ibuf = (struct pthread_unwind_buf *) buf;