This is the mail archive of the binutils@sourceware.org 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: cross-compiling LM32 internal error while linking


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


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