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: 798153 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:92:b0:351:d90a:5487 with SMTP id m18csp496237wrx; Wed, 22 May 2024 07:32:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXI3xnB0iYhI9MArmqTKvQo9lakfNzz003V7e4PTFdqGyV46nvAQj0CDovu7zOtdgZ+lEWj5gA74XlZdkR4cXIq X-Google-Smtp-Source: AGHT+IFOD7Sneyqc6D2ywzhxh8QTO7dHu22pquL2nw4+Rm2lEB0K2l0xTDd2Qh2LbEa1tiUGiPBs X-Received: by 2002:a05:6214:5707:b0:6ab:1b6b:c8bb with SMTP id 6a1803df08f44-6ab7f373b35mr30488516d6.36.1716388362690; Wed, 22 May 2024 07:32:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716388362; cv=pass; d=google.com; s=arc-20160816; b=0FexZjblEcW9UOeAvLOxmjJ7MuOp0yvADeFVdSuzDXA6UMEJ7NP8elVPX64FGG9jQb HGXwCK3Ebs670I5ThlThoCe4ckcFMkRKPPZA7UaGXB+9cF7yJJpjaiMwqen+d5wVdN79 o3K3Nni8dVTpar4DTz+Llnz83h0qjR2q6OZC3zHNQ5P7ZSEaRK7iybTQV1oVysdpDQd/ u5KCeWrxlvyB8B5ZyEpThbQonuGkcKSY/X3GUXtqPJWO/0/WdNT7jp589NDPeskANO20 YFI0aTFeK4GpZrOobUzg6X1lxL2naznQeBHFx7YzeDOpFUTpIJrrbm1dtDt/R0xjPRB8 G5kg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=piykPsHJ9wI5cfdSX1/uosOB1kRpvZ8tnRC16Hil3ZE=; fh=+6orIzRLXQY2FWXAtGF+abYflc8V+YPKzsYFuX0DJM4=; b=dC1tnZpC8HaCfQX9K3I4pagOniHR8brzMIJWkKQO6J02GGhhSovFpVhewWRMlYhIs9 AfMFKog8SVwvmXEGSvRLYm1krwbAdU65lVEFWRq6SUJvFnws+h5DDw7e9yjiPn9crB+r bhJt+qKh/EU4j9+weGAYRcCHA69ZPneSrcBUJBoRHXhdXYKJhO76X/keiHAVikAtJkpW BQxNIPnGpF2izFU5Bz4UU1MT4hTW2c7JgoD+ZpjMDqW3iqWDB4hnJfrzFI6SyVVxUUDQ i0t5G5Qks+984pKugBtKR0s0K1bJxCUUXQloKWPO0PajEOCzGj2I107t1iFsCYdoIkYj MvFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nsnKGTko; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6ab72904037si42137106d6.262.2024.05.22.07.32.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 07:32:42 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nsnKGTko; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4FFF9384AB43 for ; Wed, 22 May 2024 14:32:42 +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-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+patch=linaro.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)