aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabi Falk <gabifalk@gmx.com>2024-04-30 20:05:04 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-05-04 14:37:26 +0200
commitb113a6b8005ae79b7bfe438ba1c6ed1f3f227659 (patch)
treea4636302e1e03918666a02d536ce100b0e535523
parenti686: Fix multiple definitions of __memmove_chk and __memset_chk (diff)
downloadglibc-b113a6b8005ae79b7bfe438ba1c6ed1f3f227659.tar.gz
glibc-b113a6b8005ae79b7bfe438ba1c6ed1f3f227659.tar.bz2
glibc-b113a6b8005ae79b7bfe438ba1c6ed1f3f227659.zip
Add a test to check for duplicate definitions in the static librarygentoo/glibc-2.39-5
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 <gabifalk@gmx.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Dmitry V. Levin <ldv@altlinux.org> (cherry picked from commit ded2e0753e9c46debeb2e0d26c5e560d2581d314) (cherry picked from commit f8e462342189525e4605cf233b8f798d1c7f398d)
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a13cdb20c2..af34adec20 100644
--- a/Makefile
+++ b/Makefile
@@ -578,6 +578,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.