diff mbox

[MIPS] Add .note.GNU-stack section

Message ID a7bf92d3-22ce-4196-98e3-f4ccc8beaa4f@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey Sept. 10, 2014, 4:24 p.m. UTC
Someone noticed that the MIPS GCC compiler was not putting out the
.note.GNU-stack section.  This simple patch fixes that problem by
calling the standard file_end_indicate_exec_stack function.

Tested on mips-mti-linux-gnu, OK to checkin?

Steve Ellcey
sellcey@mips.com



2014-09-10  Steve Ellcey  <sellcey@mips.com>

	* config/mips/mips.c (TARGET_ASM_FILE_END): Define.

Comments

Andrew Pinski Sept. 10, 2014, 4:27 p.m. UTC | #1
> On Sep 10, 2014, at 9:24 AM, "Steve Ellcey " <sellcey@mips.com> wrote:
> 
> Someone noticed that the MIPS GCC compiler was not putting out the
> .note.GNU-stack section.  This simple patch fixes that problem by
> calling the standard file_end_indicate_exec_stack function.
> 
> Tested on mips-mti-linux-gnu, OK to checkin?

This works except you did not update the assembly files in libgcc or glibc. We (Cavium) have the same patch in our tree for a few released versions. 

Thanks,
Andrew

> 
> Steve Ellcey
> sellcey@mips.com
> 
> 
> 
> 2014-09-10  Steve Ellcey  <sellcey@mips.com>
> 
>    * config/mips/mips.c (TARGET_ASM_FILE_END): Define.
> 
> 
> diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
> index 646bb4d..bcaa9cd 100644
> --- a/gcc/config/mips/mips.c
> +++ b/gcc/config/mips/mips.c
> @@ -19146,6 +19146,9 @@ mips_lra_p (void)
> #undef TARGET_LRA_P
> #define TARGET_LRA_P mips_lra_p
> 
> +#undef TARGET_ASM_FILE_END
> +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
> +
> struct gcc_target targetm = TARGET_INITIALIZER;
> 
> #include "gt-mips.h"
diff mbox

Patch

diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 646bb4d..bcaa9cd 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -19146,6 +19146,9 @@  mips_lra_p (void)
 #undef TARGET_LRA_P
 #define TARGET_LRA_P mips_lra_p
 
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-mips.h"