From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 416073858D35 for ; Sun, 28 Apr 2024 19:27:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 416073858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 416073858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714332476; cv=none; b=ahJjUT5HjqXgtVAiBOBJtmPRfZe9aX0LdI7OE5XQIS8DLw+cxFjgP4l2k5PTmrHoTiA/xrMt3+/6RTL/Pu6ED+xCp49oF8d/ua50heE/bMKvPxoyRi3SuhlC33iyPUHwdzwpgXbiS5ciB+DoND89FJIEBtewA3Ce4lU/Tr1fac4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714332476; c=relaxed/simple; bh=uHy7GKHcZGd8I99jIPTVDZB1vyWOjOI66kpWQAI+dFM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KXlvk8iCbUc9SA2JHwHqaK+ItEccHrdzNVAwfgtZlqAu5pVFRdK8FDMR4r+E+3VRtf5TTnAg1iNsLDrnPA6HJc2buBTYUt/5OvbIpWqys9m5Ex/HN7caiLfne5gUWF56tCaPO9VfIjDkrBdcCZuuHuGhSVObmF0vqWK/wb1ukWU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714332474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sq7AwBAKduENiFvYbu1JNgShq8P7KvF3aY4RpLxAPgs=; b=LPaJQrBW9N3mN1PTPn09mAUVeEbxuMwCgQD6e0qc9MJzCo7w2C6kND3YChKcmZxA2xqFF4 3wxqbgu2d4SgNSyGR12DUYgBPGx4XlS+WTD7bx5US6I5qK+K9XrcTNYy4xfHjCCeEWpa+m eWSHlvyz27rhd6rn1f71T2tHtdVLT8c= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-WsdPRk0tM-6mF2GiETu6xA-1; Sun, 28 Apr 2024 15:27:51 -0400 X-MC-Unique: WsdPRk0tM-6mF2GiETu6xA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CCD4780E95D; Sun, 28 Apr 2024 19:27:50 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 946CC200A7CB; Sun, 28 Apr 2024 19:27:49 +0000 (UTC) From: Florian Weimer To: Gabi Falk Cc: "H.J. Lu" , libc-alpha@sourceware.org, "Dmitry V. Levin" , Sam James Subject: Re: [PATCH v2] i686: Fix multiple definitions of __memmove_chk and __memset_chk In-Reply-To: <20240427164229.1778534-1-gabifalk@gmx.com> (Gabi Falk's message of "Sat, 27 Apr 2024 16:42:27 +0000") References: <20240427164229.1778534-1-gabifalk@gmx.com> Date: Sun, 28 Apr 2024 21:27:47 +0200 Message-ID: <87mspdz3rg.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.7 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_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: * Gabi Falk: > Commit c73c96a4a1af1326df7f96eec58209e1e04066d8 updated memcpy.S and > mempcpy.S, but omitted memmove.S and memset.S. As a result, the > static library built 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 > diff --git a/Makefile b/Makefile > index 7052b46df8..2e351c0321 100644 > --- a/Makefile > +++ b/Makefile > @@ -577,6 +577,13 @@ $(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh > $(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \ > $(evaluate-test) > > +# Link libc.a as a whole to verify that it does not contain multiple > +# definitions of any symbols. > +tests-special += $(objpfx)link-static-libc.out > +$(objpfx)link-static-libc.out: > + $(LINK.o) $(whole-archive) -r $(objpfx)libc.a -o /dev/null > $@ 2>&1; \ > + $(evaluate-test) > + I do like the new test, but it still fails on i586-linux-gnu (as defined by scripts/build-many-glibs.py): /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy_chk.o): in function `__memcpy_chk': /home/bmg/src/glibc/debug/../sysdeps/i386/memcpy_chk.S:29: multiple definition of `__memcpy_chk'; /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(memcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here /home/bmg/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/13.2.1/../../../../x86_64-glibc-linux-gnu/bin/ld: /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy_chk.o): in function `__mempcpy_chk': /home/bmg/src/glibc/debug/../sysdeps/i386/mempcpy_chk.S:28: multiple definition of `__mempcpy_chk'; /home/bmg/build/glibcs/i586-linux-gnu/glibc/libc.a(mempcpy.o):/home/bmg/src/glibc/string/../sysdeps/i386/i586/memcpy.S:31: first defined here Florian