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.
This is a known caveat of the default Xtensa windowed-register ABI. Quoting the Xtensa ISA reference manual:
You have two options to fix this: