xtensa-fsf-ld: dangerous relocation: call8: call target out of range
nick clifton
nickc@redhat.com
Tue Jul 17 09:38:00 GMT 2012
Hi Max,
> net/built-in.o: In function `fib_net_init':
> fib_frontend.c:(.init.text+0x1553): dangerous relocation: call8: call
> target out of range: (.text+0x3eb38)
> If I add --no-relax ld option to this link step everything works fine.
>
> Referenced portion of the object file (net/built-in.o) looks like this:
>
> 1550: 180000 l32r a8, fffc1550
> <unregister_net_sysctl_table+0xfff6eb90>
> 1550: R_XTENSA_SLOT0_OP .init.literal+0x5a0
> 1550: R_XTENSA_ASM_EXPAND fib_trie_table
> 1553: 0b8000 callx8 a8
> 1556: caa3 beqz.n a10, 157d <fib_net_init+0x5d>
>
> Can anybody suggest the way to debug/fix it?
Take a look at bfd/elf32-xtensa.c. In particular the relax_section()
function. (Compiling with "#define DEBUG 1" might help).
It looks like linker relaxation on the xtensa is quite extensive
however, so you may have some trouble narrowing down the exact bug. You
could try contacting Sterling Augustine, the Xtensa maintainer for more
help. You might also wish to file a binutils bug report on the problem
(at http://sourceware.org/bugzilla/), althpugh if you do this it would
be really useful if you can include a small test case to reproduce the
problem.
Cheers
Nick
More information about the Binutils
mailing list