glibc/sysdeps/i386
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
..
fpu i386: ulp update for SSE2 --disable-multi-arch configurations 2024-04-25 12:56:48 +02:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i586 i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk 2024-05-02 11:50:21 +01:00
i686 i686: Fix multiple definitions of __memmove_chk and __memset_chk 2024-05-02 11:51:10 +01:00
i786
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sys Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
abort-instr.h
add_n.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
asm-syntax.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
backtrace.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
bsd-_setjmp.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
bsd-setjmp.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
configure i386: Fail if configured with --enable-cet 2024-01-09 13:55:51 -03:00
configure.ac i386: Fail if configured with --enable-cet 2024-01-09 13:55:51 -03:00
crti.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
crtn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-fixup-attribute.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine-rel.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-machine.h x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-02-28 09:02:56 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc-dynamic.h x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-02-28 09:02:56 -08:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
dl-tlsdesc.S x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-02-28 09:02:56 -08:00
dl-trampoline.S i386: Remove CET support bits 2024-01-10 05:20:20 -08:00
gccframe.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386-mcount.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
Implies Add float128 support for x86_64, x86. 2017-06-26 22:02:24 +00:00
isa.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
link-defines.sym elf: Remove Intel MPX support (lazy PLT, ld.so profile, and LD_AUDIT) 2021-10-11 11:14:02 -07:00
lshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile mcheck: Align struct hdr to MALLOC_ALIGNMENT bytes [BZ #28068] 2021-07-12 18:13:32 -07:00
malloc-alignment.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
math-use-builtins-ffs.h string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
memchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcmp.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcopy.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memmove_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memmove.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mempcpy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
memset_chk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
memset.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mp_clz_tab.c
mul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
rshift.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setfpucw.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
setjmp.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
start.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
stpncpy.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcat.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strchrnul.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strcspn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
string-inlines.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
string-opthr.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strlen.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strpbrk.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strrchr.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strspn.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sub_n.S i386: Remove CET support 2024-01-09 13:55:51 -03:00
submul_1.S Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
symbol-hacks.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sysdep.h i386: Remove CET support 2024-01-09 13:55:51 -03:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit3.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit3.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod3a.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-auditmod3b.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ld-sse-use.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
unwind-arch.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions Move __fentry__ version definition to sysdeps/{i386,x86_64} 2018-08-10 09:07:44 +02:00