glibc/sysdeps
Gabi Falk 5a2cf833f5
i686: Fix multiple definitions of __memmove_chk and __memset_chk
Commit c73c96a4a1 updated memcpy.S and
mempcpy.S, but omitted memmove.S and memset.S.  As a result, the static
library built as PIC, whether with or without multiarch support,
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

After this change, regardless of PIC options, the static library, built
for i686 with multiarch contains implementations of these functions
respectively from debug/memmove_chk.c and debug/memset_chk.c, and
without multiarch contains implementations of these functions
respectively from sysdeps/i386/memmove_chk.S and
sysdeps/i386/memset_chk.S.  This ensures that memmove and memset won't
pull in __chk_fail and the routines it calls.

Reported-by: Sam James <sam@gentoo.org>
Tested-by: Sam James <sam@gentoo.org>
Fixes: c73c96a4a1 ("i686: Fix build with --disable-multiarch")
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>
2024-05-02 11:51:10 +01:00
..
aarch64 AArch64: Remove unused defines of CPU names 2024-04-30 13:32:29 +01:00
alpha string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arc login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
arm login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
csky login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
generic login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
gnu login: Use unsigned 32-bit types for seconds-since-epoch 2024-04-19 14:38:17 +02:00
hppa login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
htl htl: Implement some support for TLS_DTV_AT_TP 2024-03-23 23:00:30 +01:00
hurd hurd: Move internal functions to internal header 2024-03-23 22:43:07 +01:00
i386 i686: Fix multiple definitions of __memmove_chk and __memset_chk 2024-05-02 11:51:10 +01:00
ieee754 Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
loongarch LoongArch: Add glibc.cpu.hwcap support. 2024-04-24 18:22:38 +08:00
m68k login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
mach htl: Implement some support for TLS_DTV_AT_TP 2024-03-23 23:00:30 +01:00
microblaze login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
mips login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
nios2 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
nptl Always define __USE_TIME_BITS64 when 64 bit time_t is used 2024-04-02 15:28:36 -03:00
or1k login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
posix posix: Sync tempname with gnulib 2024-04-10 14:53:39 -03:00
powerpc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
pthread nptl: Fix tst-cancel30 on kernels without ppoll_time64 support 2024-04-23 21:16:32 +02:00
riscv login: Check default sizes of structs utmp, utmpx, lastlog 2024-04-19 14:38:17 +02:00
s390 s390: Improve static-pie configure tests 2024-02-28 10:09:53 -03:00
sh login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
sparc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-04-19 14:38:17 +02:00
unix time: Allow later version licensing. 2024-05-01 09:03:26 -04:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86: In ld.so, diagnose missing APX support in APX-only builds 2024-04-25 17:20:28 +02:00
x86_64 Revert "x86_64: Suppress false positive valgrind error" 2024-04-13 17:42:13 +02:00