diff mbox

embedspu and execstack

Message ID 20081009134023.GA3234@bubble.grove.modra.org
State Not Applicable
Headers show

Commit Message

Alan Modra Oct. 9, 2008, 1:40 p.m. UTC
On Mon, Oct 06, 2008 at 04:16:03PM +0900, Kazunori Asayama wrote:
> Andrew Pinski wrote:
> > There was an issue with 64bit where the GCCs were not outputting the
> > section as on PPC64 with the ABI you don't need stack based execution
> > for nested function calls as there are function descriptors which
> > contain the chain variable.
> 
> Are you saying about the below?
> 
>     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21098

Yes, this is an issue if using a version of GNU ld prior to my
2007-02-19 patch to change the default execstack on ppc64.  I guess
it won't be a problem to always emit .note.GNU-stack, since embedspu
is provided in the same package as ld.

	* embedspu.sh: Pass -Wa,-noexecstack to $CC.
diff mbox

Patch

Index: binutils/embedspu.sh
===================================================================
RCS file: /cvs/src/src/binutils/embedspu.sh,v
retrieving revision 1.13
diff -u -p -r1.13 embedspu.sh
--- binutils/embedspu.sh	12 May 2008 12:23:13 -0000	1.13
+++ binutils/embedspu.sh	9 Oct 2008 13:35:44 -0000
@@ -146,7 +146,7 @@  main ()
   # 4. Write a struct spe_program_handle to .data.
   # 5. Write a table of _SPUEAR_ symbols.
   ${CC} ${FLAGS} -x assembler-with-cpp -nostartfiles -nostdlib \
-	-Wa,-mbig -Wl,-r -Wl,-x -o ${OUTFILE} - <<EOF
+	-Wa,-mbig -Wa,-noexecstack -Wl,-r -Wl,-x -o ${OUTFILE} - <<EOF
  .section .data.spetoe,"aw",@progbits
  .p2align 7
 __spetoe__: