Re: powerpc simulator questions

Andrew Cagney
2001-11-13T18:05:52Z

> OUTPUT_ARCH(powerpc) /* Specify the output machine architecture */
>
> ENTRY(main);
>
> /*
> MEMORY
> {
> vects (rx): ORIGIN = 0x0, LENGTH = 1023
> rom1 (rx): ORIGIN = 0x400, LENGTH= 511K
> ramcode (rwx): ORIGIN = 0x800000, LENGTH = 2048K
> ramdata (rw): ORIGIN = 0x0A00000, LENGTH = 2048K
> }
> */
>
> SECTIONS {
> . = 0x0;
> .vector0 :
> {
> LONG(ABSOLUTE( main ))
> }
> . = 0x400;
> .text :
> {
> *(.text)
> }
> . = 0xA00000;
> .data :
> {
> *(.data)
> }
> .bss :
> {
> *(.bss)
> end = ALIGN(0x8);
> }
> }
>
> Then i ran insight, did "target sim", "load" and it spit out something like
> /openprom/init/load-binary: broken transfer.

That sounds like a lack of memory.

Try ``target sim -t print-device-tree''. It will dump out a heap of
info. At the bottom should be something like:

/memory@0/reg 0 0x100000

which indicates 1mb of ram at address zero. Your program looks to be
loading at 0x800000.

Andrew