This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][M68K] Fix libgcc's executable stack


Hello,

The attached patch adds .note.GNU-stack annotation to M68K assembler piece of libgcc. Missing annotation makes any no-execute capabilities that M68K/ColdFire may have effectively useless.

OK to for trunk?


Thanks,


MaximK
CodeSourcery
2008-11-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
	    Paul Brook  <paul@codesourcery.com>

	* config/m68k/lb1sf68.asm: Add GNU-stack annotation to avoid
	executable stack.
Index: config/m68k/lb1sf68.asm
===================================================================
--- config/m68k/lb1sf68.asm	(revision 141996)
+++ config/m68k/lb1sf68.asm	(working copy)
@@ -4089,3 +4089,8 @@ SYM (__lesf2):
 	unlk	a6
 	rts
 #endif /* L_lesf2 */
+
+#if defined (__ELF__) && defined (__linux__)
+	/* Make stack non-executable for ELF linux targets.  */
+	.section	.note.GNU-stack,"",@progbits
+#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]