Save and restore r7 and adjust stack on failure for ARM EABI ____longjmp_chk.

This commit is contained in:
Ryosei Takagi 2011-04-01 16:44:42 +00:00 committed by Joseph Myers
parent cea4484792
commit 420d6ddd5b
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-04-01 Ryosei Takagi <ryosei@sm.sony.co.jp>
* sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S:
Save and restore r7, and also adjust sp.
2011-04-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_PATH): Define.

View File

@ -52,13 +52,15 @@ longjmp_msg:
cfi_remember_state; \
cmp sp, reg; \
bls .Lok; \
str r7, [sp, #-4]!; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (r7, 0); \
mov r5, r0; \
cfi_undefined (r5); \
mov r7, #SYS_ify(sigaltstack); \
cfi_undefined (r7); \
mov r0, #0; \
sub sp, sp, #16; /* >= sizeof (stack_t) */ \
cfi_adjust_cfa_offset (16); \
sub sp, sp, #12; /* == sizeof (stack_t) */ \
cfi_adjust_cfa_offset (12); \
cfi_remember_state; \
mov r1, sp; \
swi #0; \
@ -74,6 +76,11 @@ longjmp_msg:
cmp r2, r3; \
bhi .Lok2; \
.Lfail: \
add sp, sp, #12; \
cfi_adjust_cfa_offset (-12); \
ldr r7, [sp], #4; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (r7); \
CALL_FAIL \
cfi_restore_state; \
.Lok2: \