Problem with overlays and virtual functions.

Alan Modra amodra@bigpond.net.au
Tue Mar 3 23:39:00 GMT 2009


On Tue, Mar 03, 2009 at 01:09:36PM +0100, Peter Rönnquist wrote:
> We have a problem with vtables and segments when using overlays for SPUs on
> the CELL.
> 
> The seg.map shows that a virtual function seems to be put on address zero:
> 
> xxxx.seg.map
> -----------------------------
> .a(lib_a-impure.o)
>  .data.impure_data
>                 0x00000000000001b0      0x300
> /opt/cell/sysroot/usr/spu/lib/libc.a(lib_a-impure.o)
> 
> .rodata._ZTVZ20GOPFilterxxxE10CLinexxx
>                 0x0000000000000000       0x10
>  .rodata._ZTVZ20GOPFilterxxxE10CLinexxx
>                 0x0000000000000000       0x10 ../spu_obj/GOPFilterxxx.o
>                 0x0000000000000000                vtable for
> GOPFilterxxx::CLinexxx
> -----------------------------

How did you generate your overlay script?  --auto-overlay?  Did you
use --overlay-rodata too?  The latter is a dangerous option because
references to rodata in an overlay might be passed out from the
overlay via pointers.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list