This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [spu] Use correct section type for .toe
- From: trevor_smigiel at playstation dot sony dot com
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, andrew_pinski at playstation dot sony dot com
- Date: Mon, 2 Mar 2009 11:24:30 -0800
- Subject: Re: [spu] Use correct section type for .toe
- References: <200903021856.n22IuACv008390@d12av02.megacenter.de.ibm.com>
Hi Ulrich,
> OK for mainline and 4.3?
Yes.
Trevor
* Ulrich Weigand <uweigand@de.ibm.com> [2009-03-02 11:00]:
> Hello,
>
> the Cell/B.E. Linux ABI specifies that to make use of the CESOF
> facility (allowing access to PPE-side symbols on the SPE), SPE
> code should define TOE entries as follows:
>
> const EAR _EAR_g_mem_obj_1 __attribute__((section (".toe"))) = {0};
>
> However, this results in a linker warning "setting incorrect section
> type for .toe".
>
> The reason for this is that the .toe section has type @nobits (and
> the linker checks this), but the above line causes GCC to emit a
> section directive for .toe with the type @progbits.
>
> The patch below provides an SPU-specific TARGET_SECTION_TYPE_FLAGS
> that sets the type for .toe to @nobits.
>
> Tested on spu-elf with no regression.
>
> OK for mainline and 4.3?
>
> Bye,
> Ulrich
>