-->
Page 1 of 1

Xtensa — dangerous relocation: windowed long call crosses 1G

PostPosted: Wed Jul 01, 2015 1:34 am
by h_narasimhan
I got the following error during compilation

(.sram.text+0x1283): dangerous relocation: windowed longcall crosses 1GB boundary; return may fail: (UND+0xdeadcafe)
in one of the functions.

The architecture is Xtensa and the toolchain used is a GNU toolchain built for Xtensa. This error is inside the function elf_xtensa_do_reloc() in the file elf32-xtensa.c in binutils source code.

Please let me know the cause of this error and any possible solution.

Thanks and Regards, Hari

Re: Xtensa — dangerous relocation: windowed long call crosse

PostPosted: Wed Jul 01, 2015 4:34 pm
by projectgus
Hi Harry,

I'm guessing you're not compiling for an esp8266? The esp8266 should use the call0 ABI not the windowed ABI, so if you're compiling for esp8266 then your compiler is probably not configured properly (wrong overlay, perhaps?)

However you make it sound like you're building on xtensa, for xtensa, so maybe this is some other target? I'm not sure what the answer is in that case, sorry, it sounds like you're compiling with -mlongcalls already but you could possibly try adding it to the compiler flags. Maybe try on one of the xtensa Linux mailing lists?


Angus

Re: Xtensa — dangerous relocation: windowed long call crosse

PostPosted: Thu Jul 02, 2015 4:27 am
by h_narasimhan
Hi Agnus,

Thanks for your reply.

You are right, I am not compiling for esp8266, but on a similar custom xtensa core. My build machine is Ubuntu on sun virtual box on x86. I am compiling with -mlongcalls.

Thanks and Regards,
Hari

Re: Xtensa — dangerous relocation: windowed long call crosse

PostPosted: Thu Jul 02, 2015 9:02 am
by martinayotte
Just by curiosity, what is your "similar custom xtensa core" ?