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: m68k-elf, flat format, reloc tables, binutils 2.16, gcc 4.1.1


I've checked out there list. What I am trying to figure out now is what
I sort of data I should be seeing based on the .data relocation tables.
This is so that I can try to figure out whether the error is in elf2flt
or the linker. So, I've picked out two entries from the output of a
readelf on the libc.elf intermediate binary.

[.rela.data]
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00001e50  0007b301 R_68K_32          000010fc   _string_syserrmsgs + 0
0000213e  00000301 R_68K_32          00000000   .data + 2f9f

My understanding is as follows. The relocation table for .rela.data is a
list of pointers in the data section which must be updated for relocated
code. The address of the pointer is .data start + offset. And the
pointer value should be .data start + sym value + offset.

Is this correct? The _string_syserrmsgs work out (easily verified
because they are string pointers). The data pointer does not appear to.
Does the info field give any explanation for this? Also, does anyone
have suggestions to make more sense of the symbol name ".data"? Many
table entries are merely offsets of .data, .bss, and .text, which does
not help out with verification.

- Jate S.

-----Original Message-----
From: Mike Frysinger [mailto:vapier@gentoo.org] 
Sent: Saturday, August 04, 2007 12:46 AM
To: binutils@sourceware.org
Cc: Jate Sujjavanich
Subject: Re: m68k-elf, flat format, reloc tables, binutils 2.16, gcc
4.1.1

On Friday 03 August 2007, Jate Sujjavanich wrote:
> I am looking for more information on how the linker generates reloc 
> tables. I am using binutils 2.16 and am trying to get shared libraries

> working for the Coldfire architecture under uClinux. The first 
> dependency (shared library uClibc) fails to load because of invalid 
> values in the relocation table.

elf2flt is not a binutils thing, it's a uClinux thing.  you'd probably
be better off asking on the uClinux-dev mailing list -mike


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