This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: [Cbe-oss-dev] embedspu and execstack


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.

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__:

-- 
Alan Modra
Australia Development Lab, IBM


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