cross-compiling LM32 internal error while linking
Nick Clifton
nickc@redhat.com
Fri Feb 5 11:23:00 GMT 2016
Hi Federico,
> When I compile my code I get this message:
>
> ld: internal error: addend should be zero for R_LM32_16_GOT
>
> Then the compilation complete without errors (O_O)
> (like if that error is not an error but a warning)
This is a bug. Either the code being linked is broken somehow, possibly
due to a compiler or assembler error, and so the link should not have
succeeded. Or else the error message is actually a warning about behaviour
that the programmer (of the linker) was not expecting, and so the linker
might not have behaved correctly.
A simple testcase to reproduce the problem would certainly be helpful for
whomever does investigate this problem.
> I do not understand what does this mean, and I cannot find information on
> the web. Any hint?
Well the error message comes from the lm32_elf_relocate_section function in the
bfd/elf32-lm32.c source file, where it is processing the R_LM32_16_GOT reloc.
Exactly what this relocation is supposed to do and why its addend should be zero
I do not know. It is presumably specified by the ABI for the LM32 architecture,
but I could not find a copy of this document on the web. :-(
> If this is not the right place, can you redirect me to the
> right place?
Probably the best person to ask would be the maintainer for the LM32 code -
Jon Beniston. I have added him to the CC list of this email.
Cheers
Nick
More information about the Binutils
mailing list