[Patch, MIPS] Add .note.GNU-stack section

pinskia@gmail.com pinskia@gmail.com
Wed Sep 10 16:27:00 GMT 2014



> 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"



More information about the Gcc-patches mailing list