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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
http://bugs.gentoo.org/293637
http://sourceware.org/ml/libc-alpha/2009-12/msg00010.html
a bunch of ____longjmp_chk files mix PIC and SHARED code under just PIC.
use the HIDDEN_JUMPTARGET() function so the right function is called.
2009-11-27 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/i386/____longjmp_chk.S (CALL_FAIL):
call HIDDEN_JUMPTARGET(__fortify_fail).
* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (CALL_FAIL):
Likewise.
* sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S (CALL_FAIL): Delete.
(CHECK_RSP): Branch to HIDDEN_JUMPTARGET(__fortify_fail).
--- a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
@@ -33,10 +33,10 @@ longjmp_msg:
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
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -33,15 +33,15 @@ longjmp_msg:
cfi_remember_state; \
cfi_def_cfa_offset(16); \
leaq longjmp_msg(%rip), %rdi; \
- call __GI___fortify_fail; \
+ call HIDDEN_JUMPTARGET(__fortify_fail); \
nop; \
cfi_restore_state
#else
# define CALL_FAIL subq $8, %rsp; \
cfi_remember_state; \
cfi_def_cfa_offset(16); \
movq $longjmp_msg, %rdi; \
- call __fortify_fail; \
+ call HIDDEN_JUMPTARGET(__fortify_fail); \
nop; \
cfi_restore_state
#endif
--- a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
@@ -30,19 +30,13 @@ longjmp_msg:
#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"
|