glibc/sysdeps/i386
Adhemerval Zanella Netto f8f9a27257 i386: Fix build with --enable-fortify=3
The i386 string routines provide multiple internal definitions
for memcpy, memmove, and mempcpy chk routines:

  $ objdump -t libc.a | grep __memcpy_chk
  00000000 g     F .text  0000000e __memcpy_chk
  00000000 g     F .text  00000013 __memcpy_chk
  $ objdump -t libc.a | grep __mempcpy_chk
  00000000 g     F .text  0000000e __mempcpy_chk
  00000000 g     F .text  00000013 __mempcpy_chk
  $ objdump -t libc.a | grep __memmove_chk
  00000000 g     F .text  0000000e __memmove_chk
  00000000 g     F .text  00000013 __memmove_chk

Although is not an issue for normal static builds, with fortify=3
glibc itself might use the fortify chk functions and thus static
build might fail with multiple definitions.  For instance:

x86_64-glibc-linux-gnu-gcc -m32 -march=i686 -o [...]math/test-signgam-uchar-static -nostdlib -nostartfiles -static -static-pie [...]
x86_64-glibc-linux-gnu/bin/ld: [...]/libc.a(mempcpy-ia32.o):
in function `__mempcpy_chk': [...]/glibc-git/string/../sysdeps/i386/i686/mempcpy.S:32: multiple definition of `__mempcpy_chk';
[...]/libc.a(mempcpy_chk-nonshared.o):[...]/debug/../sysdeps/i386/mempcpy_chk.S:28: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [../Rules:298:

There is no need for mem*-nonshared.S, the __mem*_chk routines
are already provided by the assembly routines.

Checked on i686-linux-gnu with gcc 13 built with fortify=1,2,3 and
without fortify.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-07-26 09:45:55 -03:00
..
fpu Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
htl htl: Generalize i386 pt-machdep.h to x86 2023-02-12 16:33:39 +01:00
i586 string: Ensure *_chk routines have their hidden builtin definition available 2023-07-05 16:59:48 +02:00
i686 i386: Fix build with --enable-fortify=3 2023-07-26 09:45:55 -03:00
i786 Also applying directories. 1999-01-24 10:39:22 +00:00
nptl Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sys Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
abort-instr.h update from main archive 961220 1996-12-21 04:13:58 +00:00
add_n.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
asm-syntax.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
configure configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
configure.ac x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE 2022-02-14 07:34:54 -08:00
crti.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
crtn.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-fixup-attribute.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-machine-rel.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-machine.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ffs.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
i386-mcount.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
memchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
memcopy.h Parameterize OP_T_THRES from memcopy.h 2023-02-06 16:19:35 -03:00
memcpy_chk.S i386: make debug wrappers compatible with static PIE 2023-07-12 14:38:13 +02:00
memcpy.S sysdeps: Add missing hidden definitions for i386 2023-07-10 14:48:07 +02:00
memmove_chk.S i386: make debug wrappers compatible with static PIE 2023-07-12 14:38:13 +02:00
memmove.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
mempcpy_chk.S i386: make debug wrappers compatible with static PIE 2023-07-12 14:38:13 +02:00
mempcpy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
memset_chk.S i386: make debug wrappers compatible with static PIE 2023-07-12 14:38:13 +02:00
memset.S sysdeps: Add missing hidden definitions for i386 2023-07-10 14:48:07 +02:00
mp_clz_tab.c Update. 2002-03-14 20:48:50 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
rshift.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
start.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strcat.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strchrnul.S string: Add libc_hidden_proto for strchrnul 2023-02-08 17:13:56 -03:00
strcspn.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
string-inlines.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
string-opthr.h Parameterize OP_T_THRES from memcopy.h 2023-02-06 16:19:35 -03:00
strlen.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strlen.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strpbrk.S Fix misspellings in sysdeps/ -- BZ 25337 2023-05-30 23:02:29 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
strspn.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
symbol-hacks.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tlsdesc.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 2023-01-06 21:14:39 +00:00
tst-audit3.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-auditmod3a.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-auditmod3b.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-ld-sse-use.sh Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
unwind-arch.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Versions Move __fentry__ version definition to sysdeps/{i386,x86_64} 2018-08-10 09:07:44 +02:00