[ECOS] Linking problem

Andrew Lunn andrew.lunn@ascom.ch
Tue Feb 12 03:42:00 GMT 2002


On Tue, Feb 12, 2002 at 12:28:02PM +0100, Igor Trevisan wrote:
> Hi all!
> 
> In the following lines you can see a part of the output messages
> generated by the make process. 
> Can anybody explain me the meaning of the error message
> and, why not, a way to solve the problem?
> Thanks a lot in advance...
> 	Igor.
> 
> 
> attempt to open /arm-ecos-tools/i686-pc-cygwin/lib/gcc-lib/arm-
> elf/2.95.2/libgcc.a succeeded
> (/arm-ecos-tools/i686-pc-cygwin/lib/gcc-lib/arm-
> elf/2.95.2/libgcc.a)_ashrdi3.o
> (/arm-ecos-tools/i686-pc-cygwin/lib/gcc-lib/arm-
> elf/2.95.2/libgcc.a)_ctors.o
> (/arm-ecos-tools/i686-pc-cygwin/lib/gcc-lib/arm-
> elf/2.95.2/libgcc.a)_fixunsdfsi.o
> (/arm-ecos-tools/i686-pc-cygwin/lib/gcc-lnandsupp.o: In function 
> `NANDRead_256':
> nandsupp.o(.text+0xb0): relocation truncated to fit: R_ARM_PC24 
> *UND*
> nandsupp.o(.text+0xdc): relocation truncated to fit: R_ARM_PC24 
> *UND*

Humm, could be wrong here, but i think i understand. The normal ARM
jump instructions only has space for a 24 bit offset to jump. So you
can only jump forward or backward 2^23 bytes. Normally this is not a
problem, but it can be if you have your code split across two sections
of memory which are widely spaced. eg, you had DRAM from 0-16Mbytes,
and FLASH at say somewhere in the middle of the address space. In this
case the offset is bigger than 23 bits. When this happens you have to
use a different way of jumping from one to the other. The compiler has
to be told which are local and which are remote etc. 

Like is said, this is not normally a problem since its not normal to
want to split your code between flash and DRAM. Maybe you do, but i
guess not....

My guess is you have a confused linker script, or you have swapped
from ROM startup to RAM startup without re-making all the object
files. 

I suggest you delete your work tree and build it again from
scratch. Do the same for the application code. See if that solves your
problem.

        Andrew

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