From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 4581E3864858 for ; Tue, 6 Jul 2021 19:27:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4581E3864858 Received: by mail-pj1-x102c.google.com with SMTP id ie21so83139pjb.0 for ; Tue, 06 Jul 2021 12:27:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/zHvmSx+rmGE0DwW3VTs1OoyTsBMJJlUAaA/CWNaL64=; b=WfAtNJKWC8UXl0Dv5ydLXcGZcX4y69PXkbiPhO1ABLKdHljjIvuz4Ewjl9cN5YuiIQ QrU7M6lTWPYrxbUV0Xl5daQWoDhRbOtNyBX9mpE9a9L2qNeDmrCFeYDBSszgQYfgRtTr S1PQz69rOUlzh0pM3F67oK55bUweMvSxSYS0cgqY7Vw8oG1KCC7R/++4VnX6+TFBSZPS g4/a2Y9fu8V98zhwsatwf2kE27FsZso6XTXMiy0S424rVJGDfGlalAr0uyt4a0kGBedt MEvtGdMjwocxLYCsqpNYe/bUA5iR67J6lN5aYlI1Vat/tCOpWCiTDliYpMxD80Aupmcg UNFg== X-Gm-Message-State: AOAM5330tnCQsRlxPO7pRLtNCjV7bTusQujtW9tFX2oUnSKKiboGAAtt U+IcYjrqI56w6xW+iVi2gzYGcKEWF0y4AQ== X-Google-Smtp-Source: ABdhPJzeFbzCy34oGKFvsyZDUenvWPp/ZnLdfjpWMoByvHdcGd4OytnmLCwpsjjsgBNYXivTR3uu1g== X-Received: by 2002:a17:902:e744:b029:129:a87b:eb16 with SMTP id p4-20020a170902e744b0290129a87beb16mr4472325plf.44.1625599622183; Tue, 06 Jul 2021 12:27:02 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id x13sm15956526pjh.30.2021.07.06.12.27.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jul 2021 12:27:01 -0700 (PDT) Subject: Re: [PATCH 3/4] nptl: Reduce the GLIBC_PRIVATE ABI To: Florian Weimer , libc-alpha@sourceware.org References: From: Adhemerval Zanella Message-ID: Date: Tue, 6 Jul 2021 16:26:59 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2021 19:27:04 -0000 On 06/07/2021 14:22, Florian Weimer via Libc-alpha wrote: > The remaining symbols are mostly used by libthread_db. > __pthread_get_minstack has to remain exported even though unused. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > nptl/Versions | 42 ---------------------------------- > nptl/pthread_barrier_init.c | 5 ++-- > nptl/pthread_barrier_wait.c | 5 ++-- > nptl/pthread_cond_wait.c | 5 ++-- > nptl/pthread_mutex_timedlock.c | 5 ++-- > nptl/pthread_testcancel.c | 5 ++-- > 6 files changed, 15 insertions(+), 52 deletions(-) > > diff --git a/nptl/Versions b/nptl/Versions > index 0a1c75509a..2a75f013f2 100644 > --- a/nptl/Versions > +++ b/nptl/Versions > @@ -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; Ok. > diff --git a/nptl/pthread_barrier_init.c b/nptl/pthread_barrier_init.c > index 3a13d2a756..4aa3b8c0d9 100644 > --- a/nptl/pthread_barrier_init.c > +++ b/nptl/pthread_barrier_init.c > @@ -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, Ok. > diff --git a/nptl/pthread_barrier_wait.c b/nptl/pthread_barrier_wait.c > index 4f8abe16bb..10b68c1c35 100644 > --- a/nptl/pthread_barrier_wait.c > +++ b/nptl/pthread_barrier_wait.c > @@ -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, Ok. > diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c > index daba8600fe..dc8c511f1a 100644 > --- a/nptl/pthread_cond_wait.c > +++ b/nptl/pthread_cond_wait.c > @@ -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) Ok. > diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c > index 5afd6222d6..11ad7005d0 100644 > --- a/nptl/pthread_mutex_timedlock.c > +++ b/nptl/pthread_mutex_timedlock.c > @@ -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) Ok. > diff --git a/nptl/pthread_testcancel.c b/nptl/pthread_testcancel.c > index 920374643a..31185d89f2 100644 > --- a/nptl/pthread_testcancel.c > +++ b/nptl/pthread_testcancel.c > @@ -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); > Ok.