SPU overlay example?

Alan Modra amodra@bigpond.net.au
Fri Jul 6 01:16:00 GMT 2007

On Thu, Jul 05, 2007 at 02:03:54PM -0600, Marcus G. Daniels wrote:
> I'm trying to use a linker script to describe overlays for a small 
> program on a Cell SPU, but I get crashes on the overlay loads.
> At the end of this message is the output of `objdump --section-headers' 
> for my executable.  The relevant overlay sections are .text.0 and 
> .text.1, which I created like so:
> {
>   .text.0 { func1.o(.text.calc1) }
>   .text.1 { func2.o(.text.calc2) }
> }

By the look of the section layout, you just linked with the above as
your entire link script, didn't you?  You should instead use the
standard linker script, ldscripts/elf32_spu.x, with the above overlay
description added just before the .text section.  (If you put it after
.text, func?.o(.text.calc?) will match .text.* in the .text output
section and you won't have any overlays.)

Needing to edit the standard script is messy.  Some way of inserting
a user snippet into the standard script would be nice..

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list