[U-Boot] Some M68K boards are depending the specific order of libraries

Andreas Bießmann andreas.devel at googlemail.com
Wed Dec 11 11:05:27 CET 2013


Dear Masahiro Yamada,

On 12/11/2013 10:32 AM, Masahiro Yamada wrote:

<snip>

> And then, build again
> $ make cobra5272   CROSS_COMPILE=m68k-linux-
> <<snip>>
> arch/m68k/cpu/mcf52x2/start.o: In function `_start':
> /home/yamada/workspace/u-boot-org/arch/m68k/cpu/mcf52x2/start.S:201:(.text+0x448): relocation truncated to fit: R_68K_PC16 against symbol `cpu_init_f' defined in .text.cpu_init_f section in arch/m68k/cpu/mcf52x2/built-in.o
> /home/yamada/workspace/u-boot-org/arch/m68k/cpu/mcf52x2/start.S:202:(.text+0x44c): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in arch/m68k/lib/built-in.o
> arch/m68k/cpu/mcf52x2/start.o: In function `_exc_handler':
> /home/yamada/workspace/u-boot-org/arch/m68k/cpu/mcf52x2/start.S:300:(.text+0x4da): relocation truncated to fit: R_68K_PC16 against symbol `exc_handler' defined in .text.exc_handler section in arch/m68k/lib/built-in.o
> arch/m68k/cpu/mcf52x2/start.o: In function `_int_handler':
> /home/yamada/workspace/u-boot-org/arch/m68k/cpu/mcf52x2/start.S:308:(.text+0x4fc): relocation truncated to fit: R_68K_PC16 against symbol `int_handler' defined in .text.int_handler section in arch/m68k/lib/built-in.o
> make[1]: *** [u-boot] Error 1
> make[1]: Leaving directory `/home/yamada/workspace/u-boot-org'
> make: *** [cobra5272] Error 2
> 
> 
> 
> The build will fail with error messages
> " relocation truncated to fit: R_68K_PC16 against symbol"
> 
> What is this error?

It is a linker error stating that the specific call (for example 'bsr
cpu_init_f' @start.S:201) will not work cause (and this is guessing) the
PC relative jump with 16 bit offset can not work cause the symbol
cpu_init_f is to far away.
I had similiar issue in linux kernel for avr32 these days. I found a
work around, please read https://lkml.org/lkml/2013/10/24/156 to
understand it.

Best regards

Andreas Bießmann


More information about the U-Boot mailing list