aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/cris
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2012-07-22 14:55:38 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2012-07-22 14:55:38 +0000
commit922a784c4f6ab28e0619c55d1b4d20c1503082f1 (patch)
treea011a417558d03aa844dae3843d373b7d216bf03 /gcc/config/cris
parenteb448bee82b18bb8130c2d848e6c9e89e8503bd0 (diff)
downloadgcc-922a784c4f6ab28e0619c55d1b4d20c1503082f1.zip
gcc-922a784c4f6ab28e0619c55d1b4d20c1503082f1.tar.gz
gcc-922a784c4f6ab28e0619c55d1b4d20c1503082f1.tar.bz2
Emit executable-stack note correctly for CRIS targets.
* config/cris/cris.c (cris_file_end): New function. (TARGET_ASM_FILE_END): Define. From-SVN: r189755
Diffstat (limited to 'gcc/config/cris')
-rw-r--r--gcc/config/cris/cris.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 98dd696..4a73c81 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -153,6 +153,7 @@ static void cris_trampoline_init (rtx, tree, rtx);
static rtx cris_function_value(const_tree, const_tree, bool);
static rtx cris_libcall_value (enum machine_mode, const_rtx);
static bool cris_function_value_regno_p (const unsigned int);
+static void cris_file_end (void);
/* This is the parsed result of the "-max-stack-stackframe=" option. If
it (still) is zero, then there was no such option given. */
@@ -199,6 +200,8 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#undef TARGET_ASM_FILE_START
#define TARGET_ASM_FILE_START cris_file_start
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END cris_file_end
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS cris_init_libfuncs
@@ -2747,6 +2750,17 @@ cris_file_start (void)
default_file_start ();
}
+/* Output that goes at the end of the file, similarly. */
+
+static void
+cris_file_end (void)
+{
+ /* For CRIS, the default is to assume *no* executable stack, so output
+ an executable-stack-note only when needed. */
+ if (TARGET_LINUX && trampolines_created)
+ file_end_indicate_exec_stack ();
+}
+
/* Rename the function calls for integer multiply and divide. */
static void
cris_init_libfuncs (void)