From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 398F3386FC26 for ; Wed, 19 May 2021 20:20:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 398F3386FC26 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-550-diPHz-mpO0yUxbI5UREz_Q-1; Wed, 19 May 2021 16:20:10 -0400 X-MC-Unique: diPHz-mpO0yUxbI5UREz_Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7719B100747B; Wed, 19 May 2021 20:20:09 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F17660CCC; Wed, 19 May 2021 20:20:08 +0000 (UTC) From: Florian Weimer To: Jonathan Nieder Cc: libc-alpha@sourceware.org, Szabolcs Nagy Subject: Re: [PATCH] nptl: Add missing __pthread_cond_wait alias in static builds References: <87eee2v8tj.fsf@oldenburg.str.redhat.com> Date: Wed, 19 May 2021 22:20:06 +0200 In-Reply-To: (Jonathan Nieder's message of "Wed, 19 May 2021 13:09:34 -0700") Message-ID: <87v97etr0p.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 19 May 2021 20:20:15 -0000 * Jonathan Nieder: > Hi, > > Florian Weimer wrote: > >> Fixes commit cf3fff1c195f859ba949a7ad86d4fca70bd99740 ("nptl: Move >> cnd_wait into libc"). >> >> I think this is the only missing strong_alias. The other places either >> have a matching versioned_symbol for the __pthread_ internal alias, >> already define the strong alias, or there are no internal callers. >> >> Tested on i686-linux-gnu and x86_64-linux-gnu. Built with >> build-many-glibcs.py. >> >> Thanks, >> Florian >> --- >> nptl/pthread_cond_wait.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c >> index 54e504a6b5..409a99ecb7 100644 >> --- a/nptl/pthread_cond_wait.c >> +++ b/nptl/pthread_cond_wait.c >> @@ -622,6 +622,9 @@ ___pthread_cond_wait (pthread_cond_t *cond, pthread_= mutex_t *mutex) >> versioned_symbol (libc, ___pthread_cond_wait, pthread_cond_wait, >> =09=09 GLIBC_2_3_2); >> libc_hidden_ver (___pthread_cond_wait, __pthread_cond_wait) >> +#ifndef SHARED >> +strong_alias (___pthread_cond_wait, __pthread_cond_wait) >> +#endif > > It took me a while to catch what is going on here: the left-hand side > has *three* underscores, while the right-hand side has the usual two. > I think the three underscores means it's not meant to be exported, but > I'm not sure; is there some documentation that covers the conventions > in this area? > > In any event, this matches the code in similar cases, so in addition > to getting the job done it's improving consistency. :) So, > > Reviewed-by: Jonathan Nieder Thanks. Unfortunately, there is no consistent convention. We recently gained the ability to set multiple symbol versions on the same symbol, and before that, =E2=80=A6_1 and =E2=80=A6_2 aliases were sometimes used. I ho= pe get rid of the macro bits eventually and switch to something more palatable, but I don't know what that would like. Maybe we should rewrite the object files with the symbol data we want, I'm not sure. Or generate source code snippets that can be #include'd at the end of source files that define a public function. Florian