glibc/sysdeps
Gabi Falk 8b005d7869
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>
(cherry picked from commit 5a2cf833f5)
2024-05-04 13:29:48 +01:00
..
aarch64 AArch64: Check kernel version for SVE ifuncs 2024-04-09 19:58:25 +01:00
alpha Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arc login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 13:20:27 +02:00
arm login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
csky login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
generic login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 13:20:27 +02:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 13:20:27 +02:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 i686: Fix multiple definitions of __memmove_chk and __memset_chk 2024-05-04 13:29:48 +01:00
ieee754 math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
loongarch Apply the Makefile sorting fix 2024-04-14 05:41:02 -07:00
m68k login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
mach Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
microblaze login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
mips login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
nios2 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 13:20:27 +02:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
pthread nptl: Fix tst-cancel30 on kernels without ppoll_time64 support 2024-04-25 12:57:32 +02:00
riscv login: Check default sizes of structs utmp, utmpx, lastlog 2024-05-02 13:20:27 +02:00
s390 S390: Fix building with --disable-mutli-arch [BZ #31196] 2024-01-30 22:28:51 +01:00
sh login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
sparc login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
unix time: Allow later version licensing. 2024-05-03 10:15:11 +02: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 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) 2024-05-02 13:20:27 +02:00
x86_64 x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch 2024-04-14 05:41:02 -07:00