aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
authorDragan Mladjenovic <dragan.mladjenovic@rt-rk.com>2020-01-23 16:38:14 +0100
committerDragan Mladjenovic <dragan.mladjenovic@rt-rk.com>2020-01-23 17:00:02 +0100
commita3c1e1f2ff88628cb163abc5331af752221eddc0 (patch)
tree4f2525598a928a04ba1c2a6ff88898961ebec2a9 /gcc/config/mips
parentc124b345e460780e3c3d4a6e58d0e6e03da982a1 (diff)
downloadgcc-a3c1e1f2ff88628cb163abc5331af752221eddc0.zip
gcc-a3c1e1f2ff88628cb163abc5331af752221eddc0.tar.gz
gcc-a3c1e1f2ff88628cb163abc5331af752221eddc0.tar.bz2
Emit .note.GNU-stack for soft-float linux targets.
gcc/ChangeLog: 2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com> * config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to TARGET_SOFT_FLOAT. * config/mips/mips.c (TARGET_ASM_FILE_END): Define to ... (mips_asm_file_end): New function. Delegate to file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK is true. * config/mips/mips.h (NEED_INDICATE_EXEC_STACK): Define to 0. libgcc/ChangeLog: 2020-01-23 Dragan Mladjenovic <dmladjenovic@wavecomp.com> * config/mips/gnustack.h: New file. * config/mips/crti.S: Include gnustack.h. * config/mips/crtn.S: Likewise. * config/mips/mips16.S: Likewise. * config/mips/vr4120-div.S: Likewise.
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/linux.h4
-rw-r--r--gcc/config/mips/mips.c11
-rw-r--r--gcc/config/mips/mips.h2
3 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
index f8db8d5..183b62f 100644
--- a/gcc/config/mips/linux.h
+++ b/gcc/config/mips/linux.h
@@ -50,3 +50,7 @@ along with GCC; see the file COPYING3. If not see
#define GNU_USER_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
+
+#undef NEED_INDICATE_EXEC_STACK
+
+#define NEED_INDICATE_EXEC_STACK TARGET_SOFT_FLOAT
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index c9a706e..dae189e 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -22550,6 +22550,13 @@ mips_starting_frame_offset (void)
return 0;
return crtl->outgoing_args_size + MIPS_GP_SAVE_AREA_SIZE;
}
+
+static void
+mips_asm_file_end (void)
+{
+ if (NEED_INDICATE_EXEC_STACK)
+ file_end_indicate_exec_stack ();
+}
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
@@ -22857,6 +22864,10 @@ mips_starting_frame_offset (void)
#undef TARGET_STARTING_FRAME_OFFSET
#define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END mips_asm_file_end
+
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-mips.h"
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 1f9bc86..3ce0c19 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3438,3 +3438,5 @@ struct GTY(()) machine_function {
(TARGET_LOAD_STORE_PAIRS \
&& (TUNE_P5600 || TUNE_I6400 || TUNE_P6600) \
&& !TARGET_MICROMIPS && !TARGET_FIX_24K)
+
+#define NEED_INDICATE_EXEC_STACK 0