From patchwork Wed May 22 14:32:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1937846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nsnKGTko; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vkv0g2dtjz2020 for ; Thu, 23 May 2024 00:32:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 78BD53858CD1 for ; Wed, 22 May 2024 14:32:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 6902238654AD for ; Wed, 22 May 2024 14:32:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6902238654AD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6902238654AD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716388352; cv=none; b=pMqEiWTqPhyA3caUN0Tj53HCo8xWqfuyABqLVOkyhFVDpMio8l8bhykT45lndA8RNI9LU5tETHrMhf3zMoerS2fVmKoG99TbsCXg46Vd1DqHssMQRgUN8Da1/DV8jW3Uxp+xE/34eBcTYvmnjyrNAOizFQFiCpMSsGongeW1FM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716388352; c=relaxed/simple; bh=2WPWNyyO5IpDL8l4rXviD/FM+yXSuumYKEzxu3mBYQI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=X5V5SN3a5mzwrggIC7DAjZkf+5FBKOjLMdc6g+pH4U6uXtwWIUBUi7agGaPahF0amz4k1CCcsax/Yly0m//7adbaUbfi4U9RVwbJvhubOhK31C2ysHh8pfo9/Npx6ZSFHyHT199lTf8H9Xwk5FMjJt5d7Jp6HXdB9pdN7WHxPQg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-5d4d15ec7c5so2277590a12.1 for ; Wed, 22 May 2024 07:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716388348; x=1716993148; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=piykPsHJ9wI5cfdSX1/uosOB1kRpvZ8tnRC16Hil3ZE=; b=nsnKGTkoyghzqTzvrOCofDJC0xuv/fI7lw1S4k+oTbG/Xi/O5uM4SsPWc52v0jiInQ 9M/iQCJw/9uThzCTCSgBgEhYeP/NtIDaHdmJQv6A2wT1uh14Ml0P/SjLB9BiGbuy8VNT qsvOHeGOIN7oDwOlMJNKlpou0zykvmF0uiV2O95YThuSWiWKjIuG5qhKgY3+j6i0bi9B MZ3lqCKbzotQOn7B16pEbevx2HXkOVRTLz9U0o5l6wzy4tH4a8IxfsC7nLcGg0kjnOqK 85B9UXhoaQDjDWb2vCx7eEuODoTiP03obCgCT8wJHy2wkzXE7A2lSY4fT2TP602M+mdO shsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716388348; x=1716993148; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=piykPsHJ9wI5cfdSX1/uosOB1kRpvZ8tnRC16Hil3ZE=; b=VAHjA24akpHkNWjRvZGMjRzgJHe81SewsPnTz/2qs1bAw1FrWS4RnpTZvfNabQiSa6 Hlennif8r5ft917OYItTk3elkfzetyB3ktLbwnNcwgNGrI1dMr22MH8GslXmKK7/xOhb x+05KOSSFfLJWaCnorJG2sE52zi0k5owpCORs9/dkMsY/e1YQzA4t/v8K+rGdOax4TwD L2i58V38nm2tnGSsVEp1v0KmgpmqxNHO9McOPtfA7MytZ4TDfzTV4Q0Jw3aXjCXFIHDU sq6ZIxra8Jl/bWlgTCd+vATrfp+nl0oODusHjkCvHYsyZazk5+kMeb5IXxeQqJvDmUqi 4yZg== X-Gm-Message-State: AOJu0YwxvIjZy1bixvG7yx5qYl6IS6Sc0Jqje+BYq/kGhTXwaRqiTb3b 6acZGuM4itFpeNmsLFCu0JqJVYQXAnHZmXDRvXm8/hSBl1RgkWfjuDAGs/iUU8C4vlIrwMSVRb5 N X-Google-Smtp-Source: AGHT+IGbjOlFIVMc6VNy0LC50yszqKRDR201b2gFwjDkpqZgLWinD0yIsxM69xJBd41gFWIbAyXx+Q== X-Received: by 2002:a17:90a:98e:b0:2bc:9bce:dbf with SMTP id 98e67ed59e1d1-2bd9f45f4fbmr3083564a91.14.1716388348651; Wed, 22 May 2024 07:32:28 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:7718:cb55:8353:f3c4:f762]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2bd86ac7283sm4782692a91.44.2024.05.22.07.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 07:32:28 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" Subject: [PATCH] powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786) Date: Wed, 22 May 2024 11:32:04 -0300 Message-ID: <20240522143223.1187907-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org For powerpc64 the generic version provides a weak definition of strchrnul, which are already provided by the ifunc resolver. The powerpc32 version is slight different, where for static case there is no iFUNC support. The strncasecmp_l is provided ifunc resolver. Checked on powerpc-linux-gnu-power4 and powerpc64-linux-gnu. Reviewed-by: H.J. Lu --- .../powerpc/powerpc64/multiarch/strchrnul-power7.S | 3 +++ .../powerpc/powerpc64/multiarch/strchrnul-ppc64.c | 14 +++++++++++++- .../powerpc64/multiarch/strncase_l-power7.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S index 384edce8b9..fc784c2856 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S +++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S @@ -18,6 +18,9 @@ #define STRCHRNUL __strchrnul_power7 +#undef weak_alias +#define weak_alias(a,b) + #undef libc_hidden_builtin_def #define libc_hidden_builtin_def(name) diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c index 8e42504efe..7127972250 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c @@ -16,4 +16,16 @@ License along with the GNU C Library; if not, see . */ -#include +#include + +#if IS_IN (libc) +# define STRCHRNUL __strchrnul_ppc +extern __typeof (strchrnul) __strchrnul_ppc attribute_hidden; + +# include +# undef __strchrnul +weak_alias (__strchrnul_ppc, __strchrnul) +# ifdef SHARED +__hidden_ver1 (__strchrnul_ppc, __GI___strchrnul, __strchrnul_ppc); +# endif +#endif diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c b/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c index 1587079580..664ce44345 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c @@ -19,6 +19,9 @@ #define __strncasecmp_l __strncasecmp_l_power7 +#undef weak_alias +#define weak_alias(a,b) + #undef libc_hidden_def #define libc_hidden_def(name)