From patchwork Fri Mar 19 20:07:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 42709 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F92A3865479; Fri, 19 Mar 2021 20:07:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F92A3865479 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1616184465; bh=G/n0fRU/7FJ/uNcfjSYWIA304g+DAtkUMFXzh8+JgK4=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vpOIX01G+NDT3sBXOovrhCv4r6GzVhwvP+M7Se541OTzyDBEzNbGCDKOPV6irOyRH IKSHaVe4Q5x841zT/qWJtDuCLL8x95HoDiQzASJnuJeLOK0ehBfYuocYuivs4sxuij eu1cd4HFQZT+vMVw7b0A4zck13U/fkgtmFAlYHjI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 41E693857C60 for ; Fri, 19 Mar 2021 20:07:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 41E693857C60 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-422-ACEDPxC0PYexiLZ-eTgSvQ-1; Fri, 19 Mar 2021 16:07:38 -0400 X-MC-Unique: ACEDPxC0PYexiLZ-eTgSvQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 649489CC03 for ; Fri, 19 Mar 2021 20:07:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-80.ams2.redhat.com [10.36.112.80]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC4981C95E for ; Fri, 19 Mar 2021 20:07:36 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v2 2/3] locale: Use compat_symbol_reference in _nl_postload_ctype In-Reply-To: References: Message-Id: Date: Fri, 19 Mar 2021 21:07:47 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 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_H4, RCVD_IN_MSPIKE_WL, 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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. 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);