This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] use HIDDEN_JUMPTARGET in ____longjmp_chk
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 2 Dec 2009 04:46:41 -0500
- Subject: [PATCH] use HIDDEN_JUMPTARGET in ____longjmp_chk
A bunch of ____longjmp_chk files mix PIC and SHARED logic under just PIC.
Use the HIDDEN_JUMPTARGET() macro so the right function is called based
on SHARED.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
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).
sysdeps/unix/sysv/linux/i386/____longjmp_chk.S | 4 ++--
sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S | 8 +-------
sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S | 4 ++--
3 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S b/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
index a07e6c8..cd3c66a 100644
--- 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
diff --git a/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
index e097c22..fa87f67 100644
--- 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"
diff --git a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
index 5e11540..91432b1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
@@ -31,10 +31,10 @@ longjmp_msg:
#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) \
--
1.6.5.3