Sparc RELA incorrect addend
Ian Lance Taylor
iant@google.com
Tue Feb 17 20:36:00 GMT 2009
Neil Mayes <neil.mayes@googlemail.com> writes:
> On closer inspection it's a little worse. I have a local global
> variable which is located in .data @ 0x020005AC whereas the rela tells
> me its within the .text section. Symbol value == 0x02000000 (.text
> vitual address) with an addend == 0x020005AC, which is actually the
> absolute address. Looking through binutils I can see for a global
> symbol there is the following comment:
>
> /* To avoid generating warning messages about truncated relocations,
> set the relocation's address to be the same as the start of this
> section. */
>
> It's strange that it's not got the correct section ID as well as an
> incorrect addend. If I turn it into a global global everything is OK
> with addend set to zero.
>
> This is using GNU ld (GNU Binutils) 2.18
> Supported emulations:
> elf32_sparc
You are more likely to get help on GNU binutils issues at
binutils@sourceware.org. See http://sourceware.org/binutils . In order
to get help on this issue, I think you will need to provide a test case.
Ian
More information about the Gcc-help
mailing list