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


"Jate Sujjavanich" <jsujjavanich@syntech-fuelmaster.com> writes:

> [.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.

Type, sym value and sym name are derived fields.  The relocation entry
only contains offset, info and addend, where info encodes the type and
the symbol index.  Sym value is just the value of the symbol as recorded
in the symbol table.  The item to relocate is addressed by the offset
into the section, the value is computed according to the type (as
defined by the psABI).  For R_68K_32 the value is the (relocated) symbol
value plus the addend, to be stored in the 32 bit field at the offset.

> Also, does anyone have suggestions to make more sense of the symbol
> name ".data"?

It's the section symbol.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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