public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.com>
To: David Daney <ddaney@avtrex.com>
Cc: binutils@sourceware.org
Subject: Re: News MIPS option -mno-shared
Date: Thu, 09 Dec 2004 21:20:00 -0000	[thread overview]
Message-ID: <m3zn0n6ue8.fsf@gossamer.airs.com> (raw)
In-Reply-To: <41B89F28.9030407@avtrex.com>

David Daney <ddaney@avtrex.com> writes:

> Ian Lance Taylor wrote:
> > I'd like to see whether anybody has an opinion about this patch before
> > I check it in.
> > 
> > This patch adds a new option to the MIPS assembler: -mno-shared.
> > Normally the .cpload pseudo-op generates code which looks like this:
> > 
> > 	lui	$gp,%hi(_gp_disp)
> > 	addiu	$gp,$gp,%lo(_gp_disp)
> > 	addu	$gp,$gp,.cpload argument
> > 
> > With -mno-shared, the .cpload pseudo-op will generate code that looks
> > like this:
> > 
> > 	lui	$gp,%hi(_gp)
> > 	addiu	$gp,$gp,%lo(_gp)
> > 
> 
> Will this work when ld generates multiple GOTs?

Hmmm, I don't know enough about how the MIPS linker handles multiple
GOTs to know for sure.  My reading of the code indicates to me that it
will.  It seems that relocations against _gp_disp always use a single
value for the output BFD, in which case the above code sequence will
work too.  Can somebody tell me whether this is not the case, and, if
so, how to determine the correct GP value to use when calculating
_gp_disp?

Ian

  reply	other threads:[~2004-12-09 21:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-09 15:34 Ian Lance Taylor
2004-12-09 16:41 ` Richard Sandiford
2004-12-09 16:44   ` Ian Lance Taylor
2004-12-10  9:34     ` Richard Sandiford
2004-12-11  3:45       ` Ian Lance Taylor
2004-12-09 16:53 ` Thiemo Seufer
2004-12-09 18:03 ` David Daney
2004-12-09 20:32   ` Ian Lance Taylor
2004-12-10 13:45     ` Dave Korn
2004-12-10 14:12       ` Thiemo Seufer
2004-12-09 18:19 ` Maciej W. Rozycki
2004-12-09 21:05   ` Ian Lance Taylor
2004-12-09 18:52 ` David Daney
2004-12-09 21:20   ` Ian Lance Taylor [this message]
2005-02-21 22:42 ` David Daney

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=m3zn0n6ue8.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.com \
    --cc=binutils@sourceware.org \
    --cc=ddaney@avtrex.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).