From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 03411385771D for ; Tue, 25 Jul 2023 15:16:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 03411385771D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-1bba1816960so385551fac.3 for ; Tue, 25 Jul 2023 08:16:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690298210; x=1690903010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ekuKqRI0bWSr4cdKmY+dSE4tPkjwOxCiIyG+mIOYjOA=; b=O77gPRGXKafZvpLeEZWq+nVdmq2eL24TcTaGi4FvKbQpcsABRdzJdiW01tsytUlj/9 11KPtRCx9wLwAtUaqWI9zxLCwjE8L8dDXyEhQv4+NwRQyQoy5EpzjafuOQqVOvBxvnHS D8hAtQvVNey2RDmpW2hvewHSuczzCq8M2+h7E4Mle/Z9KhT+WzjQMBVGSYgW2bKduVFI 2cL1E16eImAcGpjijJZ5QE7zRQe2VgyAuSPMcvo6/rbVVxWutHsdIzNpoMSgVItXAfiU lNNz8F4YygchM2a/TpQZ2d+Nm2+z+NCtb6l/VVdD+Orxoa07KLjc7/cbzpFhvpWweXY2 AESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690298210; x=1690903010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ekuKqRI0bWSr4cdKmY+dSE4tPkjwOxCiIyG+mIOYjOA=; b=HE2N1MAZDlXj6RpOonps1gzo7wy0lLSm1gL6vTZHXVH6uv9JXB+KUcWtPSQA1sdN9n KNosAfadV5HI23All4mg128yzlqs3E/aB98l+3HecXrh6fFAhsYy6JwghoqEGHFZ72Mp fSDMPHcsTOcYIX+3sL00h9SYtsoiqeVzMTnIzcjycxiMNiGg6vs55hij/ULdaoG1qftH wrdr8HFcYv9nM5oZjNtkGvL/CO/HkM5HXcbAbeDDr78txGAfa3YTGeKcok5/QoGp9lEG vsU0/wp9vo6/5fbQ9yk7S2ww7HlYr7yxcjdyJFukNKO2C5UxthT70C/NKQfW9VMMD+X7 L+VQ== X-Gm-Message-State: ABy/qLbbuP+bec/p+TtlSBsdvumHoOolFt7v2A5Y1CWLsi2Y6iRh2DBX H3X+LB4hGOX8nntgLj2aKhVI9/6nhWt2j++iVhSNRQ== X-Google-Smtp-Source: APBJJlHAVvvjpHuZv/wfjAYglfx3YjjOxD8BkTf6LRSLSioaBlX0Cfet5iF1cnfBWm6K05GP7UfRRg== X-Received: by 2002:a05:6870:6112:b0:1b4:60b3:98bc with SMTP id s18-20020a056870611200b001b460b398bcmr15182667oae.2.1690298210418; Tue, 25 Jul 2023 08:16:50 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:d4d2:3277:e224:7a6f:4feb]) by smtp.gmail.com with ESMTPSA id ea3-20020a056870070300b001bb9d01fe3dsm525439oab.5.2023.07.25.08.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 08:16:49 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Frederic Berat Subject: [PATCH 2/4] i386: Remove memset_chk-nonshared.S Date: Tue, 25 Jul 2023 12:16:39 -0300 Message-Id: <20230725151641.923083-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230725151641.923083-1-adhemerval.zanella@linaro.org> References: <20230725151641.923083-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Similar to memcpy, mempcpy, and memmove there is no need for an specific memset_chk-nonshared.S. It can be provided by memset-ia32.S itself for static library. Checked on i686-linux-gnu. --- sysdeps/i386/i686/memset.S | 2 +- sysdeps/i386/i686/multiarch/Makefile | 4 ---- sysdeps/i386/i686/multiarch/memset-ia32.S | 9 ++++---- .../i686/multiarch/memset_chk-nonshared.S | 21 ------------------- 4 files changed, 6 insertions(+), 30 deletions(-) delete mode 100644 sysdeps/i386/i686/multiarch/memset_chk-nonshared.S diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index 0b5e671d83..b84dc3fbe9 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -27,7 +27,7 @@ #define LEN CHR+4 .text -#if defined SHARED && IS_IN (libc) +#if defined PIC && IS_IN (libc) ENTRY_CHK (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile index f48b06741f..f86e69de55 100644 --- a/sysdeps/i386/i686/multiarch/Makefile +++ b/sysdeps/i386/i686/multiarch/Makefile @@ -44,7 +44,3 @@ libm-sysdep_routines += s_fma-fma s_fmaf-fma CFLAGS-s_fma-fma.c += -mavx -mfpmath=sse CFLAGS-s_fmaf-fma.c += -mavx -mfpmath=sse endif - -ifeq ($(subdir),debug) -sysdep_routines += memset_chk-nonshared -endif diff --git a/sysdeps/i386/i686/multiarch/memset-ia32.S b/sysdeps/i386/i686/multiarch/memset-ia32.S index ac57e456d4..a1b3919a19 100644 --- a/sysdeps/i386/i686/multiarch/memset-ia32.S +++ b/sysdeps/i386/i686/multiarch/memset-ia32.S @@ -18,16 +18,17 @@ #if IS_IN (libc) # define memset __memset_ia32 -# define __memset_chk __memset_chk_ia32 # ifdef SHARED -# undef libc_hidden_builtin_def +# define __memset_chk __memset_chk_ia32 +# endif + +# undef libc_hidden_builtin_def /* IFUNC doesn't work with the hidden functions in shared library since they will be called without setting up EBX needed for PLT which is used by IFUNC. */ -# define libc_hidden_builtin_def(name) \ +# define libc_hidden_builtin_def(name) \ .globl __GI_memset; __GI_memset = memset -# endif #endif #include diff --git a/sysdeps/i386/i686/multiarch/memset_chk-nonshared.S b/sysdeps/i386/i686/multiarch/memset_chk-nonshared.S deleted file mode 100644 index e68c6e43b3..0000000000 --- a/sysdeps/i386/i686/multiarch/memset_chk-nonshared.S +++ /dev/null @@ -1,21 +0,0 @@ -/* Non-shared version of memset_chk for i686. - Copyright (C) 2017-2023 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#if IS_IN (libc) && !defined SHARED -# include -#endif -- 2.34.1