From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by sourceware.org (Postfix) with ESMTPS id 468E23857C5F for ; Wed, 24 Mar 2021 17:11:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 468E23857C5F Received: by mail-qv1-xf2b.google.com with SMTP id t5so12649523qvs.5 for ; Wed, 24 Mar 2021 10:11:25 -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:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uVdyJskS1d9q7kFKSvZAxjY5+nBdfD2qjV18O9EkfBA=; b=Xrj0K9Qe0fwHH83UzB/Zsi7x/hfE3e/DZi+jgTW1UJeqHBM2o0wmtvRcefPDnrdn// 3xJEhrVZ4lEmz+MUIhnDarfIyl9b5Vc18305PtPCZihj4cHP2GTi0kceuImkgFrkKjdX bTkmNdZRLUCWMuyOgsPaAjUFhRvEZL7U7bf/ub9yzVqVyfbytBoSPo+3eRQDTTJTeI35 WEGyPZn9nSIWEDN+xX1s/YVVf7sS/YULUbAOJiDICyE4RnawFC+Vdny8DZ+6N2oVLPmy Jszn2e0xG0mVyyMNwaXl49001walwrfiomhGxClOEtfqhFwqnTcuSavQxHlPvQEq/RmQ P18Q== X-Gm-Message-State: AOAM530iELyCTRgymLHeXb0KZ3vu9ybKASTgrTVeJMcZSAM5azB2LFaw xI526FNMQOoaohBqPuK2r27QBBxAi4LxkQ== X-Google-Smtp-Source: ABdhPJx1+E6f1MgDykMRzWnaKgWK2B9kixUv5PM6UtwUzFcZ3PTCtUcHSyvW7AE6Fz7soAtqHH6y6Q== X-Received: by 2002:a05:6214:4ae:: with SMTP id w14mr3883880qvz.45.1616605883698; Wed, 24 Mar 2021 10:11:23 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id z6sm1824490qtv.69.2021.03.24.10.11.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Mar 2021 10:11:23 -0700 (PDT) Subject: Re: [PATCH v2 2/3] locale: Use compat_symbol_reference in _nl_postload_ctype To: libc-alpha@sourceware.org References: From: Adhemerval Zanella Message-ID: <4671a5aa-188c-ccbf-e241-77c758307f55@linaro.org> Date: Wed, 24 Mar 2021 14:11:21 -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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK 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 17:11:26 -0000 On 19/03/2021 17:07, Florian Weimer via Libc-alpha wrote: > These symbol usages are not definitions, so compat_symbol_reference is > more appropriate than compat_symbol. compat_symbol_reference is also > safe to emit multiple times (in case the inline assembly is > duplicated; this is possible because it is nested in a function). > compat_symbol does not necessarily have this property because it is > intended to provide a symbol definition. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > locale/lc-ctype.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/locale/lc-ctype.c b/locale/lc-ctype.c > index 1db0605c82..7c97480cbd 100644 > --- a/locale/lc-ctype.c > +++ b/locale/lc-ctype.c > @@ -93,12 +93,14 @@ _nl_postload_ctype (void) > We need those relocations so that a versioned definition with a COPY > reloc in an executable will override the libc.so definition. */ > > -compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0); > -compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0); > -compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0); > -compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0); > -compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2); > -compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2); > +compat_symbol_reference (libc, __ctype_b, __ctype_b, GLIBC_2_0); > +compat_symbol_reference (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0); > +compat_symbol_reference (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0); > +compat_symbol_reference (libc, __ctype32_b, __ctype32_b, GLIBC_2_0); > +compat_symbol_reference (libc, __ctype32_tolower, __ctype32_tolower, > + GLIBC_2_2); > +compat_symbol_reference (libc, __ctype32_toupper, __ctype32_toupper, > + GLIBC_2_2); > > __ctype_b = current (uint16_t, CLASS, 128); > __ctype_toupper = current (int32_t, TOUPPER, 128); >