1 From 5d480f5343de00e54b8602c6787640f9831f46b7 Mon Sep 17 00:00:00 2001
2 From: Mike Frysinger <vapier@gentoo.org>
3 Date: Sun, 6 Feb 2011 12:39:08 -0500
4 Subject: [PATCH] memcpy-ssse3: enable chk symbols in static builds
6 Building static apps on x86_64 systems which use memmove such as:
9 main(int argc, char **argv) { memmove(buf, buf + argc, argc % 4); }
11 Result in linking errors along the lines of:
12 .../libc.a(memmove_chk.o): In function `__memmove_chk':
13 (.text+0x1b4): undefined reference to `__memmove_chk_ssse3_back'
14 .../libc.a(memmove_chk.o): In function `__memmove_chk':
15 (.text+0x1b9): undefined reference to `__memmove_chk_ssse3'
16 collect2: ld returned 1 exit status
18 This is due to the new ssse3 funcs only enabling their chk symbols when
19 being compiled into shared code.
21 URL: https://bugs.gentoo.org/353816
22 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
24 2011-02-06 Mike Frysinger <vapier@gentoo.org>
26 * sysdeps/x86_64/multiarch/memcpy-ssse3.S: Delete SHARED ifdef check
27 around MEMCPY_CHK symbol.
28 * sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
30 sysdeps/x86_64/multiarch/memcpy-ssse3-back.S | 2 +-
31 sysdeps/x86_64/multiarch/memcpy-ssse3.S | 2 +-
32 2 files changed, 2 insertions(+), 2 deletions(-)
34 diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
35 index 48c974e..a6a01a8 100644
36 --- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
37 +++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
41 .section .text.ssse3,"ax",@progbits
42 -#if defined SHARED && !defined NOT_IN_libc
43 +#if !defined NOT_IN_libc
46 jb HIDDEN_JUMPTARGET (__chk_fail)
47 diff --git a/sysdeps/x86_64/multiarch/memcpy-ssse3.S b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
48 index 9a878d3..ce84e3f 100644
49 --- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S
50 +++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
54 .section .text.ssse3,"ax",@progbits
55 -#if defined SHARED && !defined NOT_IN_libc
56 +#if !defined NOT_IN_libc
59 jb HIDDEN_JUMPTARGET (__chk_fail)