nptl: Reduce the GLIBC_PRIVATE ABI
authorFlorian Weimer <fweimer@redhat.com>
Wed, 7 Jul 2021 06:40:41 +0000 (08:40 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 7 Jul 2021 06:41:21 +0000 (08:41 +0200)
The remaining symbols are mostly used by libthread_db.
__pthread_get_minstack has to remain exported even though unused.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
nptl/Versions
nptl/pthread_barrier_init.c
nptl/pthread_barrier_wait.c
nptl/pthread_cond_wait.c
nptl/pthread_mutex_timedlock.c
nptl/pthread_testcancel.c

index 0a1c75509a45688564495bf96f449b59094cc54b..2a75f013f23fd3bb80b1bebb7b7f0e71511c9064 100644 (file)
@@ -379,59 +379,17 @@ libc {
     tss_set;
   }
   GLIBC_PRIVATE {
-    __default_pthread_attr;
-    __default_pthread_attr_lock;
-    __futex_abstimed_wait64;
-    __futex_abstimed_wait_cancelable64;
-    __init_sched_fifo_prio;
     __libc_alloca_cutoff;
-    __libc_cleanup_pop_restore;
-    __libc_cleanup_push_defer;
-    __libc_dl_error_tsd;
-    __libc_multiple_threads;
-    __lll_clocklock_elision;
-    __lll_lock_elision;
-    __lll_lock_wait;
     __lll_lock_wait_private;
-    __lll_trylock_elision;
-    __lll_unlock_elision;
-    __mutex_aconf;
     __nptl_create_event;
-    __nptl_deallocate_stack;
-    __nptl_deallocate_tsd;
     __nptl_death_event;
-    __nptl_free_tcb;
     __nptl_last_event;
     __nptl_nthreads;
     __nptl_rtld_global;
-    __nptl_setxid_sighandler;
-    __nptl_stack_list_add;
-    __nptl_stack_list_del;
     __nptl_threads_events;
     __nptl_version;
-    __pthread_attr_copy;
-    __pthread_attr_destroy;
-    __pthread_attr_init;
-    __pthread_attr_setaffinity_np;
-    __pthread_attr_setsigmask_internal;
-    __pthread_barrier_init;
-    __pthread_barrier_wait;
-    __pthread_cleanup_pop;
-    __pthread_cleanup_push;
-    __pthread_cleanup_upto;
-    __pthread_current_priority;
-    __pthread_disable_asynccancel;
-    __pthread_enable_asynccancel;
-    __pthread_force_elision;
     __pthread_get_minstack;
     __pthread_keys;
-    __pthread_mutex_unlock_usercnt;
-    __pthread_setcancelstate;
-    __pthread_testcancel;
-    __pthread_tpp_change_priority;
-    __pthread_unwind;
-    __sched_fifo_max_prio;
-    __sched_fifo_min_prio;
     _thread_db___nptl_last_event;
     _thread_db___nptl_nthreads;
     _thread_db___nptl_rtld_global;
index 3a13d2a75685ab71e6711f60935d44170e4b4daf..4aa3b8c0d9d03b676f7b893366735addbc2c39c3 100644 (file)
@@ -63,9 +63,10 @@ ___pthread_barrier_init (pthread_barrier_t *barrier,
 }
 versioned_symbol (libc, ___pthread_barrier_init, pthread_barrier_init,
                   GLIBC_2_34);
-versioned_symbol (libc, ___pthread_barrier_init, __pthread_barrier_init,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_barrier_init, __pthread_barrier_init)
+#ifndef SHARED
+strong_alias (___pthread_barrier_init, __pthread_barrier_init)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
 compat_symbol (libpthread, ___pthread_barrier_init, pthread_barrier_init,
index 4f8abe16bb653098c81e065b8e231a64bc50675b..10b68c1c35308a80f3b31c7f4ba02c702f9463a3 100644 (file)
@@ -223,9 +223,10 @@ ___pthread_barrier_wait (pthread_barrier_t *barrier)
 }
 versioned_symbol (libc, ___pthread_barrier_wait, pthread_barrier_wait,
                   GLIBC_2_34);
-versioned_symbol (libc, ___pthread_barrier_wait, __pthread_barrier_wait,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_barrier_wait, __pthread_barrier_wait)
+#ifndef SHARED
+strong_alias (___pthread_barrier_wait, __pthread_barrier_wait)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
 compat_symbol (libpthread, ___pthread_barrier_wait, pthread_barrier_wait,
index daba8600feedc0da26ca9014639ffb42db3aeeb3..dc8c511f1a72517ac2fcffe505c3758df61335ca 100644 (file)
@@ -699,9 +699,10 @@ ___pthread_cond_clockwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
   return __pthread_cond_clockwait64 (cond, mutex, clockid, &ts64);
 }
 #endif /* __TIMESIZE == 64 */
-versioned_symbol (libc, ___pthread_cond_clockwait,
-                 __pthread_cond_clockwait, GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_cond_clockwait, __pthread_cond_clockwait)
+#ifndef SHARED
+strong_alias (___pthread_cond_clockwait, __pthread_cond_clockwait)
+#endif
 versioned_symbol (libc, ___pthread_cond_clockwait,
                  pthread_cond_clockwait, GLIBC_2_34);
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
index 5afd6222d61e5283b95a9d8fdf2237c24bb04ea3..11ad7005d07afc6eb06d912709d8fd2d61cb3da5 100644 (file)
@@ -598,9 +598,10 @@ ___pthread_mutex_clocklock (pthread_mutex_t *mutex,
   return ___pthread_mutex_clocklock64 (mutex, clockid, &ts64);
 }
 #endif /* __TIMESPEC64 != 64 */
-versioned_symbol (libc, ___pthread_mutex_clocklock,
-                 __pthread_mutex_clocklock, GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
+#ifndef SHARED
+strong_alias (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
+#endif
 versioned_symbol (libc, ___pthread_mutex_clocklock,
                  pthread_mutex_clocklock, GLIBC_2_34);
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
index 920374643a6c8684dc923f508bb0942dc4c17344..31185d89f2ab84c6c6504278ff1f9f5adfb0cdc0 100644 (file)
@@ -35,9 +35,10 @@ ___pthread_testcancel (void)
     }
 }
 versioned_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_34);
-versioned_symbol (libc, ___pthread_testcancel, __pthread_testcancel,
-                  GLIBC_PRIVATE);
 libc_hidden_ver (___pthread_testcancel, __pthread_testcancel)
+#ifndef SHARED
+strong_alias (___pthread_testcancel, __pthread_testcancel)
+#endif
 
 #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
 compat_symbol (libc, ___pthread_testcancel, pthread_testcancel, GLIBC_2_0);