public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sources.redhat.com
Subject: Re: compiling binutils with -DDEBUG
Date: Wed, 02 Mar 2005 02:40:00 -0000	[thread overview]
Message-ID: <20050302024030.GY5299@bubble.modra.org> (raw)
In-Reply-To: <m3hdju3jvu.fsf@gossamer.airs.com>

On Tue, Mar 01, 2005 at 08:40:37PM -0500, Ian Lance Taylor wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
> 
> > >  If the assert in fixup_segment() fails, then
> > > MRI common symbols will not be handled correctly.
> > 
> > Are you sure?  I couldn't see why it mattered that the sym was resolved
> > at write.c:1857 versus being resolved at write.c:2588.  The mri common
> > testcase looks to produce good results.
> 
> A relocation against a symbol in an MRI common section has to be
> converted into a relocation against the MRI common symbol with the
> appropriate addend.  That is what the code in fixup_segment is doing.

Understood.  The relocs appear correct to me.  ie. resolve_symbol_value
is doing the right thing, I think.

dump.o:     file format elf32-m68k

RELOCATION RECORDS FOR [.data]:
OFFSET   TYPE              VALUE
00000000 R_68K_32          com1
00000004 R_68K_32          00com2+0x00000004

dump.o:     file format a.out-zero-big

RELOCATION RECORDS FOR [.data]:
OFFSET   TYPE              VALUE
00000000 32                com1
00000004 32                00com2

dump.o:     file format coff-m68k

RELOCATION RECORDS FOR [.data]:
OFFSET   TYPE              VALUE
00000000 32                com1
00000004 32                00com2

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2005-03-02  2:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-01  2:01 Alan Modra
2005-03-01  2:36 ` Ian Lance Taylor
2005-03-01 10:50   ` Alan Modra
2005-03-01 11:04     ` Alan Modra
2005-03-01 14:25     ` Ian Lance Taylor
2005-03-01 22:02       ` Alan Modra
2005-03-02  1:40         ` Ian Lance Taylor
2005-03-02  2:40           ` Alan Modra [this message]
2005-03-02  3:35             ` Ian Lance Taylor

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=20050302024030.GY5299@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.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).