This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: elf32 sparc rela incorrect section and addend
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Neil Mayes <neil dot mayes at googlemail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 18 Feb 2009 07:44:44 +1030
- Subject: Re: elf32 sparc rela incorrect section and addend
- References: <d6d1fd640902171124o591ddc29kde83e6eb2116b739@mail.gmail.com>
On Tue, Feb 17, 2009 at 07:24:32PM +0000, Neil Mayes wrote:
> I have a local global variable which is located in .data @ 0x020005AC
> whereas the rela (R_SPARC_LO10) tells me its within the .text section.
> Symbol value == 0x02000000 (.text vitual address) with an addend ==
> 0x020005AC, which is actually the absolute address.
See this comment in elfxx-sparce.c:
/* We are turning this relocation into one
against a section symbol. It would be
proper to subtract the symbol's value,
osec->vma, from the emitted reloc addend,
but ld.so expects buggy relocs. */
Since you are writing a new dynamic loader for rtems you have the
opportunity to fix this for rtems.
--
Alan Modra
Australia Development Lab, IBM