public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: geoffk@ozemail.com.au
Cc: gavin@cygnus.com, binutils@sourceware.cygnus.com, brendan@cygnus.com
Subject: Re: Reloc changes to bfd/elf32-mips.c
Date: Tue, 28 Sep 1999 22:16:00 -0000	[thread overview]
Message-ID: <19990928222137W.mitchell@codesourcery.com> (raw)
In-Reply-To: <199909290330.NAA00657@gluttony.geoffk.wattle.id.au>

>>>>> "Geoff" == Geoff Keating <geoffk@ozemail.com.au> writes:

    Geoff> For instance, the following .s file:

    Geoff> l1: b l2 l3: lw $5,%lo(l1+0x10004)($2) b l4 l2: lui
    Geoff> $2,%hi(l1+0x10004) add $3,$2,$3 lw $4,%lo(l1+0x10004)($3) b
    Geoff> l3 l4:

    Geoff> produces the following relocs from gas:

    Geoff> RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE
    Geoff> 000000000000000c R_MIPS_LO16 .text 0000000000000010
    Geoff> R_MIPS_HI16 .text 000000000000001c R_MIPS_LO16 .text

    Geoff> Contents of section .text: 0000 10000003 00000000 10000005
    Geoff> 8c450004 .............E..  0010 3c020001 00431820 1000fffb
    Geoff> 8c640004 <....C. .....d..

    Geoff> which used to cause ld to fail with an error.  gcc can
    Geoff> generate control flows like this (although some of the
    Geoff> branches have to be conditional).

I think it's OK to have `ld' (as an extension) handle this case.  But,
we really should fix GAS.  It would be useful (I know this because
customers have told me so :-)) to be able to assemble things with GAS,
but link them with the MIPS linker.  The .o files that GAS creates are
not ABI-compliant, and not for any particularly good reason.  (In
other words, I don't see a real performance improvement/useful feature
that the "incorrect" ordering buys you.)

That's an irrelevant paragraph, from the point of view of the goodness
of your patch.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

  parent reply	other threads:[~1999-09-28 22:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-27  4:30 Geoff Keating
1999-09-27 12:37 ` Mark Mitchell
1999-09-28  0:54 ` Mark Mitchell
1999-09-28  6:57   ` Ian Lance Taylor
1999-09-28 20:32   ` Geoff Keating
1999-09-28 20:57     ` Ian Lance Taylor
1999-09-28 21:52       ` Geoff Keating
1999-09-28 22:03         ` Ian Lance Taylor
1999-10-06 19:21           ` Geoff Keating
1999-10-06 19:35             ` Ian Lance Taylor
1999-10-06 20:39               ` Geoff Keating
1999-10-06 20:53                 ` Ian Lance Taylor
1999-10-07  4:47                   ` Geoff Keating
1999-10-07  7:28                     ` Ian Lance Taylor
1999-10-07  9:17                     ` Mark Mitchell
1999-09-28 22:16     ` Mark Mitchell [this message]
1999-09-29  8:25       ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
1999-09-27  4:24 Geoff Keating
1999-09-27 18:25 ` 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=19990928222137W.mitchell@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=binutils@sourceware.cygnus.com \
    --cc=brendan@cygnus.com \
    --cc=gavin@cygnus.com \
    --cc=geoffk@ozemail.com.au \
    /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).