about summary refs log tree commit diff
path: root/sysdeps/sparc/machine-gmon.h
diff options
context:
space:
mode:
authorGabi Falk <gabifalk@gmx.com>2024-04-30 20:05:03 +0000
committerSam James <sam@gentoo.org>2024-05-02 11:51:10 +0100
commit5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9 (patch)
tree0671376a0490762668485663bb2577dbad082ef5 /sysdeps/sparc/machine-gmon.h
parent0fdf4ba48ccce5abf567340b0ab8fa8ed8a9bc6e (diff)
downloadglibc-5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9.tar.gz
glibc-5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9.tar.xz
glibc-5a2cf833f5772d6c37c7adac388dd9af9cc1c4b9.zip
i686: Fix multiple definitions of __memmove_chk and __memset_chk
Commit c73c96a4a1af1326df7f96eec58209e1e04066d8 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>
Diffstat (limited to 'sysdeps/sparc/machine-gmon.h')
0 files changed, 0 insertions, 0 deletions