public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Jate Sujjavanich" <jsujjavanich@syntech-fuelmaster.com>
Cc: <binutils@sourceware.org>
Subject: Re: m68k-elf, flat format, reloc tables, binutils 2.16, gcc 4.1.1
Date: Tue, 07 Aug 2007 13:47:00 -0000	[thread overview]
Message-ID: <jeodhjwj60.fsf@sykes.suse.de> (raw)
In-Reply-To: <EC5EE493B6046F45A2DDEC4A828DE52E021DD15F@EXCHSRVR.syntech.org> 	(Jate Sujjavanich's message of "Tue\, 7 Aug 2007 09\:29\:13 -0400")

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

      reply	other threads:[~2007-08-07 13:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 19:53 Jate Sujjavanich
2007-08-04  5:02 ` Mike Frysinger
2007-08-07 13:24   ` Jate Sujjavanich
2007-08-07 13:47     ` Andreas Schwab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jeodhjwj60.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=binutils@sourceware.org \
    --cc=jsujjavanich@syntech-fuelmaster.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).