aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/1.patch
blob: 49a43df0a30da8c7a762a8660c02e55e29a574fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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