Commit a3c1e1f2 by Dragan Mladjenovic

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.
parent c124b345
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.
2020-01-23 Jakub Jelinek <jakub@redhat.com> 2020-01-23 Jakub Jelinek <jakub@redhat.com>
PR target/93376 PR target/93376
......
...@@ -50,3 +50,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -50,3 +50,7 @@ along with GCC; see the file COPYING3. If not see
#define GNU_USER_DYNAMIC_LINKERN32 \ #define GNU_USER_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
#undef NEED_INDICATE_EXEC_STACK
#define NEED_INDICATE_EXEC_STACK TARGET_SOFT_FLOAT
...@@ -22550,6 +22550,13 @@ mips_starting_frame_offset (void) ...@@ -22550,6 +22550,13 @@ mips_starting_frame_offset (void)
return 0; return 0;
return crtl->outgoing_args_size + MIPS_GP_SAVE_AREA_SIZE; 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. */ /* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP #undef TARGET_ASM_ALIGNED_HI_OP
...@@ -22857,6 +22864,10 @@ mips_starting_frame_offset (void) ...@@ -22857,6 +22864,10 @@ mips_starting_frame_offset (void)
#undef TARGET_STARTING_FRAME_OFFSET #undef TARGET_STARTING_FRAME_OFFSET
#define TARGET_STARTING_FRAME_OFFSET mips_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; struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-mips.h" #include "gt-mips.h"
...@@ -3438,3 +3438,5 @@ struct GTY(()) machine_function { ...@@ -3438,3 +3438,5 @@ struct GTY(()) machine_function {
(TARGET_LOAD_STORE_PAIRS \ (TARGET_LOAD_STORE_PAIRS \
&& (TUNE_P5600 || TUNE_I6400 || TUNE_P6600) \ && (TUNE_P5600 || TUNE_I6400 || TUNE_P6600) \
&& !TARGET_MICROMIPS && !TARGET_FIX_24K) && !TARGET_MICROMIPS && !TARGET_FIX_24K)
#define NEED_INDICATE_EXEC_STACK 0
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.
2020-01-23 Martin Liska <mliska@suse.cz> 2020-01-23 Martin Liska <mliska@suse.cz>
* libgcov-driver.c (prune_topn_counter): Remove * libgcov-driver.c (prune_topn_counter): Remove
......
...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program; ...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* An executable stack is *not* required for these functions. */
#include "gnustack.h"
/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack.
Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */
......
...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program; ...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* An executable stack is *not* required for these functions. */
#include "gnustack.h"
/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack.
Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */
......
#include "config.h"
#if defined(__ELF__) && defined(__linux__)
#if defined (__mips_soft_float)
.section .note.GNU-stack,"",%progbits
.previous
#endif
#endif
...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program; ...@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* An executable stack is *not* required for these functions. */
#include "gnustack.h"
#include "auto-host.h" #include "auto-host.h"
#if defined(__mips_micromips) || defined(__mips_soft_float) \ #if defined(__mips_micromips) || defined(__mips_soft_float) \
......
...@@ -22,6 +22,9 @@ a copy of the GCC Runtime Library Exception along with this program; ...@@ -22,6 +22,9 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
/* An executable stack is *not* required for these functions. */
#include "gnustack.h"
/* This file contains functions which implement divsi3 and modsi3 for /* This file contains functions which implement divsi3 and modsi3 for
-mfix-vr4120. div and ddiv do not give the correct result when one -mfix-vr4120. div and ddiv do not give the correct result when one
of the operands is negative. */ of the operands is negative. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment