This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Cbe-oss-dev] embedspu and execstack
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Kazunori Asayama <asayama at sm dot sony dot co dot jp>
- Cc: Andrew Pinski <pinskia at gmail dot com>, Ulrich dot Weigand at de dot ibm dot com, cbe-oss-dev at ozlabs dot org, binutils at sourceware dot org
- Date: Fri, 10 Oct 2008 00:10:23 +1030
- Subject: Re: [Cbe-oss-dev] embedspu and execstack
- References: <48E4E2DF.6050908@sm.sony.co.jp> <20081003122641.GI7258@bubble.grove.modra.org> <48E621B9.7070709@sm.sony.co.jp> <48E62C3F.3030107@sm.sony.co.jp> <de8d50360810031336p3ec107ccu58ff05e75e0b6666@mail.gmail.com> <48E9BB33.9070206@sm.sony.co.jp>
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