This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Long branches on powerpc


Hi,

  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,
chandra

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]