[ECOS] Long branches on powerpc

chandrag@danlawinc.com chandrag@danlawinc.com
Mon Feb 11 20:39:00 GMT 2002


  On our custom hardware, there are two blocks of memory.  One block at
0x00000000 (this is on chip EEPROM) and the other is at 0x02000000.  One
single block is not enough for the application code.  So we want to
distribute the code among these blocks.

  To do this we want to create two text segments.  We planed to load one
segment at address 0x00000000 and the other at 0x02000000.  When we compile
for this settings, we got a link error.  That is a relocation error on
function calls.

If we change the memory map by changing the start address of the second
block from 0x02000000 to an address less than 0x01F00000 (this is not the
exact upper limit), the application gets compiled.  The problem we guess is,
with the branch instructions at function calls.  If the branch displacement
is more than a certain value, the linker is not linking.

As there are many entry points into each block of memory,  we could not
implement calls to the routines in the other memory block by pointers.

Does anybody has any clue to slove this problem?

Thank you,

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list