summaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32/1.patch')
-rw-r--r--main/libc0.9.32/1.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/libc0.9.32/1.patch b/main/libc0.9.32/1.patch
new file mode 100644
index 00000000..49a43df0
--- /dev/null
+++ b/main/libc0.9.32/1.patch
@@ -0,0 +1,41 @@
+From ca7ec3c7b1a65070d9abbf2414b6a2f24917d863 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+Date: Wed, 20 Oct 2010 09:41:31 -0500
+Subject: [PATCH 1/2] libc: Fix build with stack protector enabled on x86_64.
+
+The code used HIDDEN_JUMPTARGET() but these symbols aren't aliased.
+So we just replace that with __chk_fail@PLT.
+---
+ libc/string/x86_64/memcpy.S | 2 +-
+ libc/string/x86_64/memset.S | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libc/string/x86_64/memcpy.S b/libc/string/x86_64/memcpy.S
+index 6d941e0..f8b9e23 100644
+--- a/libc/string/x86_64/memcpy.S
++++ b/libc/string/x86_64/memcpy.S
+@@ -30,7 +30,7 @@
+ ENTRY (__memcpy_chk)
+ cmpq %rdx, %rcx
+ #if defined __UCLIBC_HAS_SSP__
+- jb HIDDEN_JUMPTARGET (__chk_fail)
++ jb __chk_fail@PLT
+ #endif
+ END (__memcpy_chk)
+ #endif
+diff --git a/libc/string/x86_64/memset.S b/libc/string/x86_64/memset.S
+index df265f3..38744cf 100644
+--- a/libc/string/x86_64/memset.S
++++ b/libc/string/x86_64/memset.S
+@@ -33,7 +33,7 @@
+ ENTRY (__memset_chk)
+ cmpq %rdx, %rcx
+ #if defined __UCLIBC_HAS_SSP__
+- jb HIDDEN_JUMPTARGET (__chk_fail)
++ jb __chk_fail@PLT
+ #endif
+ END (__memset_chk)
+ #endif
+--
+1.7.2.1
+