]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-2.13-static-memmove-ssse3.patch
- fix for mprotect enforced kernel
[packages/glibc.git] / glibc-2.13-static-memmove-ssse3.patch
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
5
6 Building static apps on x86_64 systems which use memmove such as:
7         #include <string.h>
8         char buf[8192];
9         main(int argc, char **argv) { memmove(buf, buf + argc, argc % 4); }
10
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
17
18 This is due to the new ssse3 funcs only enabling their chk symbols when
19 being compiled into shared code.
20
21 URL: https://bugs.gentoo.org/353816
22 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
23
24 2011-02-06  Mike Frysinger  <vapier@gentoo.org>
25
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.
29 ---
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(-)
33
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
38 @@ -49,7 +49,7 @@
39    ud2
40  
41         .section .text.ssse3,"ax",@progbits
42 -#if defined SHARED && !defined NOT_IN_libc
43 +#if !defined NOT_IN_libc
44  ENTRY (MEMCPY_CHK)
45         cmpq    %rdx, %rcx
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
51 @@ -49,7 +49,7 @@
52    ud2
53  
54         .section .text.ssse3,"ax",@progbits
55 -#if defined SHARED && !defined NOT_IN_libc
56 +#if !defined NOT_IN_libc
57  ENTRY (MEMCPY_CHK)
58         cmpq    %rdx, %rcx
59         jb      HIDDEN_JUMPTARGET (__chk_fail)
60 -- 
61 1.7.4.rc2
62
This page took 0.027235 seconds and 3 git commands to generate.