From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 35C123864858 for ; Wed, 24 Mar 2021 14:42:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 35C123864858 Received: by mail-qv1-xf30.google.com with SMTP id by2so12352090qvb.11 for ; Wed, 24 Mar 2021 07:42:08 -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:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wVqyDoTV4/Q3ARm4vhqp72ZYgElD/I3o8d18pNt81Uw=; b=Luawa3WuXFrIeuYUefBi5o8o+64/u79jbH8IdLmO+bfkQ3vxoT8LBY1ewrel0L0/dP aqmFY9FjzNvM5nOMNzrT/XUmx5BpkeVgmxHzkpcQjfKYrW4V2vlz1Iu3AdZ/0PRdByov 8kXJlaWNp87DBzMD2Q74bXJBnfDJjeAbtPToT8cLGXgpFjDKNHXJshSZLXduIn2LMg0f ELqqZtK6sb948y8nXMJVTrrb4uBnisgPEioIuokw99vh1QRu/R72E1n0JBAwgDx5g/1D PI6P+AyG/CaukF9don6yKWylUPs4e7CsFnWWRsjtmpWqvLcRC/zN0FJ+flg5/DxYVkfN Gx/w== X-Gm-Message-State: AOAM531QYBiRltnkRXH/C7FhShcfpvRNZRkzNy3MZcrhryKFniK1dwkT 2ba0T82PobjINcmhEkCGce02laBMCjZ//A== X-Google-Smtp-Source: ABdhPJzBpFanS0HVljBLnXlf/6AA/1PzTg6PNDBxEuTxK0fT1KWl6ua/9N/MFCAjklrLEAxneFqAUQ== X-Received: by 2002:a05:6214:18c3:: with SMTP id cy3mr3400778qvb.1.1616596927653; Wed, 24 Mar 2021 07:42:07 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id 85sm1944258qkf.58.2021.03.24.07.42.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Mar 2021 07:42:07 -0700 (PDT) Subject: Re: [PATCH v3 24/37] nptl: Move pthread_key_create, __pthread_key_create into libc To: Florian Weimer Cc: libc-alpha@sourceware.org References: <5118e919-fac6-a116-5f39-3915fdc0e0af@linaro.org> <87h7l0wrjj.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: <0794e296-158f-26a4-f49b-b8e8aef5b305@linaro.org> Date: Wed, 24 Mar 2021 11:42:05 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87h7l0wrjj.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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, 24 Mar 2021 14:42:09 -0000 On 24/03/2021 11:32, Florian Weimer wrote: > * Adhemerval Zanella: > >>> @@ -86,7 +88,9 @@ libc { >>> } >>> GLIBC_2.34 { >>> __pthread_cleanup_routine; >>> + __pthread_key_create; >>> __pthread_once; >>> + pthread_key_create; >>> pthread_mutex_consistent; >>> pthread_once; >>> } >> >> Why do we need a __pthread_key_create for 2.34? > > __pthread_key_create is used by libstdc++. Sigh... the description at libgcc/gthr-posix.h is *really* hacky and I think we provide the __libc_single_threaded exactly to avoid keep providing this kind of interfaces. > >>> @@ -47,5 +47,18 @@ __pthread_key_create (pthread_key_t *key, void (*destr) (void *)) >>> >>> return EAGAIN; >>> } >>> -weak_alias (__pthread_key_create, pthread_key_create) >>> -hidden_def (__pthread_key_create) >>> +versioned_symbol (libc, __pthread_key_create_1, __pthread_key_create, >>> + GLIBC_2_34); >>> +libc_hidden_ver (__pthread_key_create_1, __pthread_key_create) >>> + >>> +/* Several aliases for setting different symbol versions. */ >>> +strong_alias (__pthread_key_create_1, __pthread_key_create_2) >>> +strong_alias (__pthread_key_create_1, __pthread_key_create_3) >>> +strong_alias (__pthread_key_create_1, __pthread_key_create_4) >>> + >>> +versioned_symbol (libc, __pthread_key_create_2, pthread_key_create, >>> + GLIBC_2_34); >>> +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34) >>> +compat_symbol (libc, __pthread_key_create_3, __pthread_key_create, GLIBC_2_0); >>> +compat_symbol (libc, __pthread_key_create_4, pthread_key_create, GLIBC_2_0); >>> +#endif >> >> I think you might want to revise it once compat_symbol has support >> for multiple targets. > > Right that, applies in other places throughout the series, too. > > Speaking of which, should I repost the compat_symbol patches? Isn't the one in patchwork the latest [1]? [1] https://patchwork.sourceware.org/project/glibc/patch/07c2defd7f03c5f2493a4132de673f33457d7806.1616184336.git.fweimer@redhat.com/