MIPS %half in gas
Maciej W. Rozycki
macro@linux-mips.org
Fri Oct 12 17:48:00 GMT 2007
On Fri, 12 Oct 2007, Daniel Jacobowitz wrote:
> > Though the test case may be confusing -- given the relocation operates on
> > an unsigned value, the use of "lw" in the test case is misleading. I
> > think "ori", "andi" or "xori" would be better. Although of these only
> > "ori" looks remotely useful and I am not sure if using this relocation on
> > code rather than data (".hword %half(foo)") makes sense at all.
>
> This is where my lack of knowing what things are for comes into play.
Me too, just trying to apply some common sense which may not always be
justified. ;-)
> That expands to something like %half(__GOTT_INDEX__)($gp) which is a
> magic symbol defined by the runtime to a small value, so the
> signedness does not much matter.
Well, such an abuse may work and may even be necessary for someone, but
it does not mean we should actively promote it, does it? ;-)
Maciej
More information about the Binutils
mailing list