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


Hi,

I am implementing a dynamic task loader for RTEMS using a Sparc ERC32.
I have been looking in what is invloved and what I need to do in order
to relocate the code however I have seen the relocations which use an
addend are incorrect, the addend is the absolute value not the offset
from the symbol value.

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. 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 and the section ID is correct pointing to .data.

I don't know if this has been fixed in a later release, I've have done
a search but not found anything for this.

This is using GNU ld (GNU Binutils) 2.18
 Supported emulations:
  elf32_sparc

Thanks,
Neil

PS Very new to GNU :-S


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