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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 3582B3857829 for ; Thu, 18 Mar 2021 10:09:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3582B3857829 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-599-tooTBUlnPMG6-S9Nqfaouw-1; Thu, 18 Mar 2021 06:09:03 -0400 X-MC-Unique: tooTBUlnPMG6-S9Nqfaouw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B150E83DD2A; Thu, 18 Mar 2021 10:09:02 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-121.ams2.redhat.com [10.36.115.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73FA15D9C6; Thu, 18 Mar 2021 10:09:01 +0000 (UTC) From: Florian Weimer To: Joseph Myers Cc: Adhemerval Zanella , Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 15/30] nptl: Remove pread from libpthread References: <20210316200510.2135405-1-adhemerval.zanella@linaro.org> <20210316200510.2135405-16-adhemerval.zanella@linaro.org> <87o8fhy3r8.fsf@oldenburg.str.redhat.com> <87k0q5y3cx.fsf@oldenburg.str.redhat.com> <986f7915-13ad-97d8-230d-797000c6c397@linaro.org> <87wnu5wnrg.fsf@oldenburg.str.redhat.com> Date: Thu, 18 Mar 2021 11:09:09 +0100 In-Reply-To: (Joseph Myers's message of "Wed, 17 Mar 2021 21:11:46 +0000") Message-ID: <87pmzwu62i.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.6 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_H3, 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: Thu, 18 Mar 2021 10:09:07 -0000 * Joseph Myers: > On Wed, 17 Mar 2021, Florian Weimer via Libc-alpha wrote: > >> Ah I see it now: mips64-linux-gnu-n64 has only this: >>=20 >> 1556: 0000000000109b70 300 FUNC GLOBAL DEFAULT 12 __libc_pr= ead@@GLIBC_PRIVATE >> 2229: 0000000000109b70 300 FUNC WEAK DEFAULT 12 pread@@GL= IBC_2.2 > > (Because MIPS didn't have glibc 2.1, so uses the shlib-versions feature o= f=20 > skipping all versions between GLIBC_2.0 and GLIBC_2.2 and mapping them to= =20 > GLIBC_2.2.) > >> Likewise ia64-linux-gnu: >>=20 >> 1640: 00000000001bb180 528 FUNC GLOBAL DEFAULT 11 __libc_pr= ead@@GLIBC_PRIVATE >> 2624: 00000000001bb180 528 FUNC WEAK DEFAULT 11 pread@@GL= IBC_2.2 > > (Because ia64 symbol versions for many libraries start at GLIBC_2.2.) Ahh, so alpha isn't really an outlier after all? Adhemerval, would you please check if you can write a condition in generic code using OTHERLIB_COMPAT (libpthread, =E2=80=A6) with the appropr= iate version ranges? OTHERLIB_COMPAT would have to be defined like this: diff --git a/include/shlib-compat.h b/include/shlib-compat.h index 4b224c2672..6303639f28 100644 --- a/include/shlib-compat.h +++ b/include/shlib-compat.h @@ -45,6 +45,14 @@ =20 #ifdef SHARED =20 +/* Like LIB_COMPAT, but can check versions in other libraries. It is + not always false outside for !IS_IN (LIB). */ +#define OTHERLIB_COMPAT(lib, introduced, obsoleted)=09\ + _LIB_COMPAT (lib, introduced, obsoleted) +#define _OTHERLIB_COMPAT(lib, introduced, obsoleted)=09=09=09\ + (!(ABI_##lib##_##obsoleted - 0)=09=09=09=09=09\ + || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))) + /* Similar to LIB_COMPAT, but evaluate to 0 for static build. The compatibility code should be conditionalized with e.g. `#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced @@ -79,6 +87,7 @@ #else =20 /* Not compiling ELF shared libraries at all, so never any old versions. = */ +# define OTHERLIB_COMPAT(lib, introduced, obsoleted)=090 # define SHLIB_COMPAT(lib, introduced, obsoleted)=090 =20 /* No versions to worry about, just make this the global definition. */ Thanks, Florian