From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4E3E41F4B4 for ; Wed, 21 Oct 2020 12:57:55 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 62A083870880; Wed, 21 Oct 2020 12:57:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62A083870880 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603285073; bh=VaDH7Y6L+uhNuwGaO4Jgg44xXpyPLAh6RtFkK9cip3I=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Z7seUEfFEz0TTsnUb/dWQMscl5zKjQ5a1U1fGUKv578c7hrit+/fZqDoZrhn/Xbt3 7TRkxo29MCN7ShP90JAkasxgShFesDBrVyBqdTr+rbb4d4lXyjmZjwiiZa/Mp/V8+4 +ge+fYII9sELPqnYTSEL/oa2oRyhJE3v/91UWOHY= 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 DBD8C3851C03 for ; Wed, 21 Oct 2020 12:57:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DBD8C3851C03 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-291-ngeNgGOLNhCPbRdLNYcoFQ-1; Wed, 21 Oct 2020 08:57:48 -0400 X-MC-Unique: ngeNgGOLNhCPbRdLNYcoFQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7E3021006C97; Wed, 21 Oct 2020 12:57:47 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-83.ams2.redhat.com [10.36.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2CC05C22A; Wed, 21 Oct 2020 12:57:46 +0000 (UTC) To: Adhemerval Zanella Subject: Re: __xstat et al. as compat symbols References: <20200723194641.1949404-1-adhemerval.zanella@linaro.org> <20200723194641.1949404-15-adhemerval.zanella@linaro.org> <87blgw2lyk.fsf_-_@oldenburg2.str.redhat.com> <0b5a532d-3d5a-0574-359e-1993720b9bb3@linaro.org> Date: Wed, 21 Oct 2020 14:57:44 +0200 In-Reply-To: <0b5a532d-3d5a-0574-359e-1993720b9bb3@linaro.org> (Adhemerval Zanella's message of "Wed, 21 Oct 2020 08:59:44 -0300") Message-ID: <87tuunvirb.fsf@oldenburg2.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.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Alistair Francis , Adhemerval Zanella via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Adhemerval Zanella: > On 21/10/2020 02:21, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c >>> index 9d6b8eca32..bcfb55050c 100644 >>> --- a/sysdeps/unix/sysv/linux/alpha/fxstat64.c >>> +++ b/sysdeps/unix/sysv/linux/alpha/fxstat64.c >>> @@ -22,9 +22,11 @@ >>> #include >>> #include >>> #include >>> +#include >>> >>> /* Get information about the file NAME in BUF. */ >>> int >>> +attribute_compat_text_section >>> __fxstat64 (int vers, int fd, struct stat64 *buf) >>> { >>> switch (vers) >>> @@ -42,4 +44,12 @@ __fxstat64 (int vers, int fd, struct stat64 *buf) >>> } >>> } >>> } >>> -strong_alias (__fxstat64, __fxstat); >>> + >>> +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33) >>> +strong_alias (__fxstat64, __fxstat_compat) >>> +compat_symbol (libc, __fxstat_compat, __fxstat, GLIBC_2_0); >>> +#endif >>> + >>> +#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) >>> +compat_symbol (libc, __fxstat64, __fxstat64, GLIBC_2_1); >>> +#endif >> >> This change breaks a lot of static libraries out there. Do we really >> want to do this immediately, or should we just stop using these symbols >> from libc_nonshared.a, and defer the compat symbol treatment to a future >> glibc version? > > This is the similar the libm finite symbols where my understanding was > user was supposed to rebuild the library. I think the impact of that is a bit narrower because it requires special compiler flags. But I suspect I will ask for reverting that in a year as well. 8-/ > The issue is only for static linking, by stopping using > libc_nonshared.a we need to provide the versioned stat symbols anyway. > And we still need to handle new ABIs where adding the old xstat > symbols does not make sense (such as riscv32 or any new 32-bit > architecture). You could use a SHLIB_COMPAT conditional without compat_symbol, the two are separate. > It would required a new compat_symbol directive to export the symbols > *just* for static linking and some building tinkering to just build > the xstat symbol for dynamic object and static linking depending of > support ABI version. The problem is not relying on the contents of libc_nonshared.a, that is working still. It's code that calls __xstat et al. directly via the old inline functions in the headers. > If we just defer the compat move, it would add the needless symbols on > newer ABIs that we will need to keep supporting indefinitely (even > though they won't be used anywhere unless user explicily links against > a protected symbol) and we would eventually need to handle the y2038 > support on old ABIs (with the _TIME_SIZE selection) by either adding > proper 64-bit time support for by removing the xstat for good. See above, we can (and should) remove it on newer ABIs only. Thanks, Florian -- Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill