diff options
author | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-20 14:49:51 +0000 |
---|---|---|
committer | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-20 14:49:51 +0000 |
commit | c46389f0ac560e67a438f70620a9340456778eb9 (patch) | |
tree | f52044c174fb3d9f216f4b1f50a3a749b46669cd /gcc/config/nios2 | |
parent | 0d0f1868a46b0830d09804198b8075d232a8bd28 (diff) | |
download | gcc-c46389f0ac560e67a438f70620a9340456778eb9.tar.gz |
2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
gcc/
* config/nios2/nios2.c (nios2_asm_file_end): Implement
TARGET_ASM_FILE_END hook for adding .note.GNU-stack section when
needed.
(TARGET_ASM_FILE_END): Define.
libgcc/
* config/nios2/linux-unwind.h (nios2_fallback_frame_state):
Update rt_sigframe format and address for current Nios II
Linux conventions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/nios2')
-rw-r--r-- | gcc/config/nios2/nios2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 502314942cc..a7a140ee8d6 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -2223,6 +2223,18 @@ nios2_output_dwarf_dtprel (FILE *file, int size, rtx x) fprintf (file, ")"); } +/* Implemet TARGET_ASM_FILE_END. */ + +static void +nios2_asm_file_end (void) +{ + /* The Nios II Linux stack is mapped non-executable by default, so add a + .note.GNU-stack section for switching to executable stacks only when + trampolines are generated. */ + if (TARGET_LINUX_ABI && trampolines_created) + file_end_indicate_exec_stack (); +} + /* Implement TARGET_ASM_FUNCTION_PROLOGUE. */ static void nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) @@ -3401,6 +3413,9 @@ nios2_merge_decl_attributes (tree olddecl, tree newdecl) #undef TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA #define TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA nios2_output_addr_const_extra +#undef TARGET_ASM_FILE_END +#define TARGET_ASM_FILE_END nios2_asm_file_end + #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE nios2_option_override |