This is the mail archive of the mailing list for the binutils 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]

Re: xtensa-fsf-ld: dangerous relocation: call8: call target out of range

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
                         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, althpugh if you do this it would be really useful if you can include a small test case to reproduce the problem.


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