SH: Optimize assembler code in context of call to __fortify_fail.
__fortify_fail has »__attribute__ ((__noreturn__))«.
This commit is contained in:
parent
db9b505976
commit
1518f58b61
@ -1,5 +1,9 @@
|
|||||||
2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
|
2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/sh/____longjmp_chk.S (CALL_FAIL): Don't plan for the call to
|
||||||
|
__fortify_fail returning.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S (CALL_FAIL): Likewise.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S: New file, based on
|
* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S: New file, based on
|
||||||
sysdeps/sh/____longjmp_chk.S.
|
sysdeps/sh/____longjmp_chk.S.
|
||||||
* sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym: New file, based
|
* sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym: New file, based
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2009 Free Software Foundation, Inc.
|
/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -33,31 +33,27 @@ longjmp_msg:
|
|||||||
add r0, r12; \
|
add r0, r12; \
|
||||||
bsrf r1; \
|
bsrf r1; \
|
||||||
add r12, r4; \
|
add r12, r4; \
|
||||||
|
/* Unreachable. */ \
|
||||||
.Lfail0: \
|
.Lfail0: \
|
||||||
bra 0f; \
|
|
||||||
nop; \
|
|
||||||
.align 2; \
|
.align 2; \
|
||||||
.Lgot: \
|
.Lgot: \
|
||||||
.long _GLOBAL_OFFSET_TABLE_; \
|
.long _GLOBAL_OFFSET_TABLE_; \
|
||||||
.Lstr: \
|
.Lstr: \
|
||||||
.long longjmp_msg@GOTOFF; \
|
.long longjmp_msg@GOTOFF; \
|
||||||
.Lfail: \
|
.Lfail: \
|
||||||
.long __GI___fortify_fail@PLT-(.Lfail0-.); \
|
.long __GI___fortify_fail@PLT-(.Lfail0-.);
|
||||||
0:
|
|
||||||
#else
|
#else
|
||||||
# define CALL_FAIL \
|
# define CALL_FAIL \
|
||||||
mov.l .Lfail, r1; \
|
mov.l .Lfail, r1; \
|
||||||
mov.l .Lstr, r4; \
|
mov.l .Lstr, r4; \
|
||||||
jsr @r1; \
|
jsr @r1; \
|
||||||
nop; \
|
nop; \
|
||||||
bra 0f; \
|
/* Unreachable. */ \
|
||||||
nop; \
|
|
||||||
.align 2; \
|
.align 2; \
|
||||||
.Lstr: \
|
.Lstr: \
|
||||||
.long longjmp_msg; \
|
.long longjmp_msg; \
|
||||||
.Lfail: \
|
.Lfail: \
|
||||||
.long __fortify_fail; \
|
.long __fortify_fail;
|
||||||
0:
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHECK_SP(reg) \
|
#define CHECK_SP(reg) \
|
||||||
|
@ -38,30 +38,26 @@ longjmp_msg:
|
|||||||
bsrf r1; \
|
bsrf r1; \
|
||||||
add r12, r4; \
|
add r12, r4; \
|
||||||
.Lfail0: \
|
.Lfail0: \
|
||||||
bra 0f; \
|
/* Unreachable. */ \
|
||||||
nop; \
|
|
||||||
.align 2; \
|
.align 2; \
|
||||||
.Lgot: \
|
.Lgot: \
|
||||||
.long _GLOBAL_OFFSET_TABLE_; \
|
.long _GLOBAL_OFFSET_TABLE_; \
|
||||||
.Lstr: \
|
.Lstr: \
|
||||||
.long longjmp_msg@GOTOFF; \
|
.long longjmp_msg@GOTOFF; \
|
||||||
.Lfail: \
|
.Lfail: \
|
||||||
.long __GI___fortify_fail@PLT-(.Lfail0-.); \
|
.long __GI___fortify_fail@PLT-(.Lfail0-.);
|
||||||
0:
|
|
||||||
#else
|
#else
|
||||||
# define CALL_FAIL \
|
# define CALL_FAIL \
|
||||||
mov.l .Lfail, r1; \
|
mov.l .Lfail, r1; \
|
||||||
mov.l .Lstr, r4; \
|
mov.l .Lstr, r4; \
|
||||||
jsr @r1; \
|
jsr @r1; \
|
||||||
nop; \
|
nop; \
|
||||||
bra 0f; \
|
/* Unreachable. */ \
|
||||||
nop; \
|
|
||||||
.align 2; \
|
.align 2; \
|
||||||
.Lstr: \
|
.Lstr: \
|
||||||
.long longjmp_msg; \
|
.long longjmp_msg; \
|
||||||
.Lfail: \
|
.Lfail: \
|
||||||
.long __fortify_fail; \
|
.long __fortify_fail;
|
||||||
0:
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CHECK_SP(reg) \
|
#define CHECK_SP(reg) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user