diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-11-17 18:22:04 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-11-17 18:22:04 +1100 |
commit | 71664fd8d2d2550a56cc6a9c2b81797bfe90d613 (patch) | |
tree | 6f55e009ff6a8b00f9f1c7a905ad4075225dec93 /asm/misc.S | |
parent | 31d20fc02c8ee7c12d84bc28ce732bbc362ce369 (diff) | |
download | talos-skiboot-71664fd8d2d2550a56cc6a9c2b81797bfe90d613.tar.gz talos-skiboot-71664fd8d2d2550a56cc6a9c2b81797bfe90d613.zip |
Stack checking extensions
This patch adds:
- Normal builds are done with -fstack-protector (we want to investigate
using -fstack-protector-strong on gcc4.9 but for now we just use that
- Build with STACK_CHECK=1 will use -fstack-protector-all and -pg and
will check the stack in mcount
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'asm/misc.S')
-rw-r--r-- | asm/misc.S | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -17,6 +17,7 @@ #include <asm-utils.h> #include <asm-offsets.h> #include <processor.h> +#include <stack.h> .section ".text","ax" .balign 0x10 @@ -41,3 +42,11 @@ trigger_attn: isync attn blr + +#ifdef STACK_CHECK_ENABLED +.global _mcount +_mcount: + mr %r3,%r1 + mflr %r4 + b __mcount_stack_check +#endif |