This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: SPU overlay example?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Marcus G. Daniels" <mdaniels at lanl dot gov>
- Cc: binutils at sourceware dot org
- Date: Fri, 6 Jul 2007 10:41:36 +0930
- Subject: Re: SPU overlay example?
- References: <468D4EAA.7020702@lanl.gov>
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:
>
> OVERLAY :
> {
> .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