[Cbe-oss-dev] MARS and SPU-GCC 4.6

Paul Keir pkeir at dcs.gla.ac.uk
Sat Jan 29 02:57:54 EST 2011


> For your purposes, it should probably just work if you simply
> use .interrupt instead of .init in the command line above ...

Thankyou. That did indeed work. I transplanted it into my real
code, and although the elf files there have three segments, not
four, with .interrupt a part of the first (listed below), your
suggestion worked here too.

I did use a new version of newlib; version 1.18. This was a
default in a built script I found here:

https://github.com/HACKERCHANNEL/ps3chain

Which I edited for a gcc 4.6 snapshot, and ran with:

./buildit.sh spu

I've edited that script now to avoid building newlib, and
am waiting for the build to complete.

Many thanks again. I gather you were also responsible for
the -ffunction-sections etc. work on libgfortran.a Thanks
also for that, which is actually why I'm using a
recent spu-gcc.

Cheers,
Paul

-bash-3.2# spu-readelf -l SBF.o

Elf file type is EXEC (Executable file)
Entry point 0x4030
There are 3 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x000100 0x00004000 0x00004000 0x02e90 0x02e90 R E 0x80
  LOAD           0x003000 0x00006f00 0x00006f00 0x00780 0x00c90 RW  0x80
  NOTE           0x00fda0 0x00000000 0x00000000 0x0001c 0x00000 R   0x10

 Section to Segment mapping:
  Segment Sections...
   00     .interrupt .init .text .fini .rodata
   01     .ctors .dtors .jcr .data .bss
   02     .note.spu_name


The University of Glasgow, charity number SC004401


More information about the cbe-oss-dev mailing list