public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Eric Christopher <echristo@apple.com>
To: Amarnath <amarnath@acmet.com>
Cc: binutils@sources.redhat.com
Subject: Re: Query in MIPS HI and LO relocations
Date: Thu, 20 Apr 2006 15:36:00 -0000	[thread overview]
Message-ID: <9AF61D1A-506A-4F5A-99CC-0E0E6F91FEB0@apple.com> (raw)
In-Reply-To: <000201c66486$d17663b0$ad00a8c0@amarnath>


On Apr 20, 2006, at 7:29 AM, Amarnath wrote:

> Hi all,
>
> I am having a query in the MIPS ABI. As per the SYSTEM V ABI,
> R_MIPS_HI16 relocation should be immediately followed by its
> corresponding R_MIPS_LO16.
>
> I would like to know whether this is specific to SYSTEM V architecture
> alone / the linker specification can be changed as per our own
> architecture.

You're free to do whatever you want. I'd look at some of the comments  
in elfxx-mips.c for guidance, e.g.

               /* The combined value is the sum of the HI16 addend,
                      left-shifted by sixteen bits, and the LO16
                      addend, sign extended.  (Usually, the code does
                      a `lui' of the HI16 value, and then an `addiu' of
                      the LO16 value.)

                      Scan ahead to find a matching LO16 relocation.

                      According to the MIPS ELF ABI, the R_MIPS_LO16
                      relocation must be immediately following.
                      However, for the IRIX6 ABI, the next relocation
                      may be a composed relocation consisting of
                      several relocations for the same address.  In
                      that case, the R_MIPS_LO16 relocation may occur
                      as one of these.  We permit a similar extension
                      in general, as that is useful for GCC.  */

-eric

  parent reply	other threads:[~2006-04-20 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 14:50 Amarnath
2006-04-20 15:24 ` Thiemo Seufer
2006-04-20 15:36 ` Eric Christopher [this message]
2006-04-20 16:00 ` Dave Korn
2006-04-21 10:06   ` Amarnath

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=9AF61D1A-506A-4F5A-99CC-0E0E6F91FEB0@apple.com \
    --to=echristo@apple.com \
    --cc=amarnath@acmet.com \
    --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).