summaryrefslogtreecommitdiff
path: root/toolchain/glibc/patches/longjmp_chk.patch
blob: b2590460c6442f73dcf54393b4b84c690eb889fc (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
--- glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S	2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S	2010-02-19 08:06:22.000000000 +0100
@@ -33,10 +33,10 @@
 			cfi_register(%ebx,%ecx);			      \
 			LOAD_PIC_REG (bx);				      \
 			leal	longjmp_msg@GOTOFF(%ebx), %eax;		      \
-			call	__GI___fortify_fail@PLT
+			call	HIDDEN_JUMPTARGET(__fortify_fail)
 #else
 # define CALL_FAIL	movl	$longjmp_msg, %eax;			      \
-			call	__fortify_fail
+			call	HIDDEN_JUMPTARGET(__fortify_fail)
 #endif
 
 
diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
--- glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S	2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S	2010-02-19 08:06:22.000000000 +0100
@@ -30,19 +30,13 @@
 
 #define __longjmp ____longjmp_chk
 
-#ifdef PIC
-#  define CALL_FAIL	__GI___fortify_fail
-#else
-#  define CALL_FAIL	__fortify_fail
-#endif
-
 #define CHECK_RSP(reg) \
 	cmp.ltu p0, p8 = reg, r12;				\
 (p8)	br.cond.dpnt .Lok;;					\
 	addl r28 = @ltoffx(longjmp_msg#), r1;;			\
 	ld8.mov r28 = [r28], longjmp_msg#;;			\
 	ld8 out0 = [r28];					\
-	br.call.sptk.many b0 = CALL_FAIL#;;			\
+	br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \
 .Lok:
 
 #include "__longjmp.S"
diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
--- glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S	2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S	2010-02-19 08:06:22.000000000 +0100
@@ -31,10 +31,10 @@
 
 #ifdef PIC
 # define CALL_FAIL	leaq	longjmp_msg(%rip), %rdi;		      \
-			call	__GI___fortify_fail
+			call	HIDDEN_JUMPTARGET(__fortify_fail)
 #else
 # define CALL_FAIL	movq	$longjmp_msg, %rdi;			      \
-			call	__fortify_fail
+			call	HIDDEN_JUMPTARGET(__fortify_fail)
 #endif
 
 #define CHECK_RSP(reg) \