From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7919) id 7FDC13858D39; Sat, 4 May 2024 12:30:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FDC13858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1714825839; bh=U8jrRQsVbL8yM1woq3znN022j77SgpmmE4KDLz+Cbk4=; h=From:To:Subject:Date:From; b=TcEcmQ3VnQYW/AexrVTnNNfMR5PSS6TBEcJIUq86AvARx0tuK55n23W3xFvKPb6Ln 7+QodfNIysKFfdbGmUX1qEw/H/FOPEIhgN1fpPojBQFCmeVKEHi17AsyfG2dqhceWQ /K+J0YWHHCE1beUSYOB2cj3HTl1wZ7RAsSF1bysY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sam James To: glibc-cvs@sourceware.org Subject: [glibc/release/2.39/master] Add a test to check for duplicate definitions in the static library X-Act-Checkin: glibc X-Git-Author: Gabi Falk X-Git-Refname: refs/heads/release/2.39/master X-Git-Oldrev: 8b005d7869debac4d5cd67f65e49a0fad89da9ad X-Git-Newrev: f8e462342189525e4605cf233b8f798d1c7f398d Message-Id: <20240504123039.7FDC13858D39@sourceware.org> Date: Sat, 4 May 2024 12:30:39 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f8e462342189525e4605cf233b8f798d1c7f398d commit f8e462342189525e4605cf233b8f798d1c7f398d Author: Gabi Falk Date: Tue Apr 30 20:05:04 2024 +0000 Add a test to check for duplicate definitions in the static library This change follows two previous fixes addressing multiple definitions of __memcpy_chk and __mempcpy_chk functions on i586, and __memmove_chk and __memset_chk functions on i686. The test is intended to prevent such issues from occurring in the future. Signed-off-by: Gabi Falk Reviewed-by: H.J. Lu Reviewed-by: Dmitry V. Levin (cherry picked from commit ded2e0753e9c46debeb2e0d26c5e560d2581d314) Diff: --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) 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) + # Print test summary for tests in $1 .sum file; # $2 is optional test identifier. # Fail if there are unexpected failures in the test results.