[U-Boot-Users] u-boot linking error

Hi,
When building a u-boot image for our custom 440 board using the command 'make ramsym=1', I have the following error message which I don't know how to solve it. I copied the linker script from Ebony board. And there is no problem if I build the image for flash, i.e., text starting at 0xFFF80000. The ICE I'm using doesn't support dynamic symbol loading address as what GDB has.
cpu/ppc4xx/start.o(.text+0x144): In function `__440gx_msr_continue': /code/u-boot/cpu/ppc4xx/start.S:314: relocation truncated to fit: R_PPC_REL24 cbsram_init cpu/ppc4xx/start.o(.bootpg+0x164): In function `setivpr': /code/u-boot/cpu/ppc4xx/start.S:326: relocation truncated to fit: R_PPC_REL24 _start make: *** [u-boot] Error 1
Any hints are appreciated.
Regards, -Shawn.

In message c3d0340b0511071519qace6792maa3b283070346b60@mail.gmail.com you wrote:
When building a u-boot image for our custom 440 board using the command 'make ramsym=1', I have the following error message which I
Please read the FAQ: http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted...
board. And there is no problem if I build the image for flash, i.e.,
Then build the image for flash and use this. This is the only supported mode of operation anyway.
Best regards,
Wolfgang Denk

When building a u-boot image for our custom 440 board using the command 'make ramsym=1', I have the following error message which I
Please read the FAQ: http://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStarted...
Oh...I know and understand this FAQ. ;)
board. And there is no problem if I build the image for flash, i.e.,
Then build the image for flash and use this. This is the only supported mode of operation anyway.
I guess I didn't explain my problem very clearly. I don't start u-boot in RAM. The only reason I'm trying to build a ram version is to get a symbol file with TEXT_BASE at a ram address instead of a flash address. The WindRiver ICE doesn't suport loading symbols from an arbitrary address. :(
The thing I don't understand is why changing TEXT_BASE would cause the link error.
Thanks, -Shawn.

In message c3d0340b0511071556r1cdecba4s257bb50103df61b7@mail.gmail.com you wrote:
The thing I don't understand is why changing TEXT_BASE would cause the link error.
You see R_PPC_REL24 "relocation out of range" errors when the "distance" between symbols is bigger than the range addressable with a 24 bit offset.
Best regards,
Wolfgang Denk

You see R_PPC_REL24 "relocation out of range" errors when the "distance" between symbols is bigger than the range addressable with a 24 bit offset.
Thank you all for the hints. I figured out how to modify the link script to generate RAM image. Since u-boot is already relocated to RAM, the sections for reset vector and bootpg are essentially useless. So I just deleted the definitions related to these two sections.
.resetvec 0xFFFFFFFC : { *(.resetvec) } = 0xffff
.bootpg 0xFFFFF000 : { cpu/ppc4xx/start.o (.bootpg) } = 0xffff
And I got my symbol files for WindRiver ICE.
Regards, -Shawn.
participants (2)
-
Shawn Jin
-
Wolfgang Denk