Skip to content

Commit

Permalink
Use HIDDEN_JUMPTARGET rather than spelling out its effects, for ____l…
Browse files Browse the repository at this point in the history
…ongjmp_chk implementations.
  • Loading branch information
Roland McGrath committed Sep 15, 2011
1 parent 4d8e1f1 commit b402e91
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2011-09-15 Roland McGrath <roland@hack.frob.com>

* sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
(CALL_FAIL): Use HIDDEN_JUMPTARGET for __fortify_fail.
* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
(CALL_FAIL): Likewise.
* sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S (CHECK_RSP): Likewise.
(CALL_FAIL): Macro removed.
Patch mostly by Mike Frysinger <vapier@gentoo.org>.

2011-09-15 Ulrich Drepper <drepper@gmail.com>

* sysdeps/x86_64/fpu/bits/mathinline.h: Add fmax and fmin optimizations
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
8 changes: 1 addition & 7 deletions sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,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
Expand Down

0 comments on commit b402e91

Please sign in to comment.