From patchwork Fri Apr 26 10:50:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabi Falk X-Patchwork-Id: 89031 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 2B8FA38708EC for ; Fri, 26 Apr 2024 10:52:37 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 58FBD38708EB for ; Fri, 26 Apr 2024 10:52:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58FBD38708EB Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 58FBD38708EB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714128728; cv=none; b=N8CFq8mju5+GuLKMRL3UV81L1KKD2ZxgZ0umgm8Ybehp21R4ZUxHdU2r1JkrNcRgXrlLs8DrreZ/linHITK3CF7sZ3tKpYFUovGiHXTnlxSfF1Muh0icnzazLDd60DzQpDoVmzSNyTTU4aMOm7pRMhg3CiR3A5863Ra5pPNTPR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714128728; c=relaxed/simple; bh=q6mlPc6SWP/a2hkNARa32YXilMzI6kjj0ZDfAuZV+TY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kS5p2ZOpQ3jho4R8x32rdFcY+bIDGcW50fHjazVyiaxiJ62y4xIlrLJKRJVvnudxAL2eaB1HnVXPLRk0hOK2Qf/KuY5I5KOHSojxE7I/R6zN5YAeq2NHsYRQv4spIpIHlY88GRvjJ8xK2d5hA5EsK0lK25+ql8XkThUp6zVBbRY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1714128709; x=1714733509; i=gabifalk@gmx.com; bh=QrdMq5Va6jyn5znVaB+ekpZiWhiyoHX0WMLjVvgcL9c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID: MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=uUSXQ5iJ1rXj1m/yx8UW9PMBR64/9E2udLABC6rMpE0SPnMd2R3E65CMy95x9Y8E r5OpHmJs3X5ENVXiXWY1jeztiA2s5u62UqLg26e/aM4czSEALW5m7glzezWrE+QgN yiwYHrPy1akD1eHgDF8RMMKnjy7DzBn63P0PK0io3nrt7wVRUT/Gtd00IWduLDTiC Oax7JV0T7Bp4+Orwf0o7NZzmLwyLYJ9VMO14Kx/2WKJxR6d9Wc+lSc3m+yIP5I0cn omHtpWRagSyN0CSvruZogN4//c0uiToeyLuuAbaGy+UTD5JjMdBoSMj3iInmY+m06 u1EW1XnSIbtMUymayw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost ([46.120.23.13]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MaJ81-1sERnM07Dp-00Vsju; Fri, 26 Apr 2024 12:51:49 +0200 From: Gabi Falk To: libc-alpha@sourceware.org Cc: Gabi Falk , Sam James Subject: [PATCH] i686: Fix multiple definitions of __memmove_chk and __memset_chk Date: Fri, 26 Apr 2024 10:50:00 +0000 Message-ID: <20240426105001.699765-1-gabifalk@gmx.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:YEqsZHJLdAV73avfmv/q8jGXYbKwzNphS2ctQTIyG3XI9eSoQZ5 0l3lEBAmQFbQjO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paM= X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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+patchwork=sourceware.org@sourceware.org Commit c73c96a4a1af1326df7f96eec58209e1e04066d8 updated memcpy.S and mempcpy.S, but omitted memmove.S` and memset.S. As a result, the static library built with enabled multiarch (the default) contains two definitions for each of the __memmove_chk and __memset_chk symbols. /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../i686-pc-linux-gnu/bin/ld: /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset-ia32.o): in function `__memset_chk': /var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/string/../sysdeps/i386/i686/memset.S:32: multiple definition of `__memset_chk'; /usr/lib/gcc/i686-pc-linux-gnu/14/../../../../lib/libc.a(memset_chk.o):/var/tmp/portage/sys-libs/glibc-2.39-r3/work/glibc-2.39/debug/../sysdeps/i386/i686/multiarch/memset_chk.c:24: first defined here Reported-by: Sam James Fixes: c73c96a4a1 ("i686: Fix build with --disable-multiarch") Signed-off-by: Gabi Falk --- sysdeps/i386/i686/memmove.S | 2 +- sysdeps/i386/i686/memset.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- gabi diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S index f230359ad6..effd958120 100644 --- a/sysdeps/i386/i686/memmove.S +++ b/sysdeps/i386/i686/memmove.S @@ -29,7 +29,7 @@ #define SRC DEST+4 #define LEN SRC+4 -#if defined PIC && IS_IN (libc) +#if defined SHARED && IS_IN (libc) ENTRY_CHK (__memmove_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index f02f5a6df7..ab06771ea0 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -27,7 +27,7 @@ #define LEN CHR+4 .text -#if defined PIC && IS_IN (libc) +#if defined SHARED && IS_IN (libc) ENTRY_CHK (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp)