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,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 F2EB31F4B4 for ; Wed, 21 Oct 2020 13:09:15 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE5BC3850412; Wed, 21 Oct 2020 13:09:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE5BC3850412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603285754; bh=CxyAq2K+quTU9uzoyYjen00KUtEvjTk/QXXE8ovwt9o=; h=To:References:Subject:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nsKZdo7J5yvUqoPO0/XLBSuA2fzkDYJ1mzgjyGubaxjrlENOCHzv/WynClYk1GT2R ONr0Nu3g+pfhpSBI+2lg1jSpJNE5891WEouIrDAApvPGmJi6bAjizPKgsCGvKOraYe MJJVkL4Jq+i5oYq1XaNPGpZ+8gbFSZyMI8teBGOg= Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by sourceware.org (Postfix) with ESMTPS id 97C02385702C for ; Wed, 21 Oct 2020 13:09:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97C02385702C Received: by mail-qk1-x72f.google.com with SMTP id v200so2345466qka.0 for ; Wed, 21 Oct 2020 06:09:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=CxyAq2K+quTU9uzoyYjen00KUtEvjTk/QXXE8ovwt9o=; b=ZOW6FPOggYeoKOfmi+K4U92l+XxQm0ka6PkvbwqfYeWOW0yypvVZRVM7Y22ew1J4LW 1a5uSAI54gwwToj+0rThXc8aBt1oP3X81vBHRJ36CBcqRKWSzHsHib/CPyisH4fI0dZP 0uIUBj088/ld9OIC9dYa1UMgB2qRC1SZeTrs7EDTiWlYGv3z+cOa/8nDS3VWLjpri1V3 LP0L0+8MpyYf3FOKiUftAFmfA2vaB7r3LwA2xD1trtGqNlJxDWRnaUSirzqIx0kcUgTq Datq4s6G7vn0r5q3ZkjOsvjHzIr6eiPWvYq6DFUMAlgKXxVj312kGn/76DqvjGMk2eph ueEA== X-Gm-Message-State: AOAM530NwYFLr/yYP1L280XGYQnajrWkitM0neZUZ+aEK+kBGNprAXid RQdw+sLo60rOY2F7tqvUt6X2AA== X-Google-Smtp-Source: ABdhPJzlYGFwshvvgdTRRLIxusLnA5Tm8H7fbJ6VjNMZaTZGNXwcXtueq8QySrYGzlH2EKhJK62D5g== X-Received: by 2002:a37:af81:: with SMTP id y123mr929875qke.50.1603285750723; Wed, 21 Oct 2020 06:09:10 -0700 (PDT) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id p5sm1166869qte.95.2020.10.21.06.09.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Oct 2020 06:09:10 -0700 (PDT) To: Florian Weimer 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> <87tuunvirb.fsf@oldenburg2.str.redhat.com> Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= mQINBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABtElBZGhlbWVydmFs IFphbmVsbGEgTmV0dG8gKExpbmFybyBWUE4gS2V5KSA8YWRoZW1lcnZhbC56YW5lbGxhQGxp bmFyby5vcmc+iQI3BBMBCAAhBQJXFRpKAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJ EKqx7BSnlIjv0e8P/1YOYoNkvJ+AJcNUaM5a2SA9oAKjS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909594601a0@linaro.org> Date: Wed, 21 Oct 2020 10:09:07 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87tuunvirb.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: Alistair Francis , Adhemerval Zanella via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 21/10/2020 09:57, Florian Weimer wrote: > * 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-/ It is sad that we can't get rid of clunky and not well thought interface, which kind of issues are you seeing that is making you thinking about reverting the libm finite symbols? > >> 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. The problem is with: #if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) int __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) { } #endif It won't be built for static and without using SHLIB_COMPAT in this case will build the interfaces for ABIs that doe not require it. > >> 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. Yes, I am aware. I am outlining is I think we would need some thikering to build for static case that is not easily support with the current shlib-compat macros we have. > >> 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. So now is we are moving in providing what is supposed to be compat symbols in the static library case as well. Do we really want to start supporting such scenario?