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: elf32 sparc rela incorrect section and addend


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


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