This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: TLS support for MIPS
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 08 Feb 2005 09:30:15 +0000
- Subject: Re: TLS support for MIPS
- References: <20050207230014.GA32655@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> writes:
> OK? Comments, questions, things I failed to explain?
Haven't had chance to read the patch in detail yet, but just in case
it gets a quick review, I thought I'd beter respond to one thing
straight away...
I don't like the way you've overloaded the %hi(%other(...)) syntax
to apply to single relocations. I think it should be reserved for
true composite relocations (i.e. where the output file has both
R_MIPS_HI16 and R_MIPS_OTHER entries).
We already have separate operators for things like R_MIPS_CALL_HI16 and
R_MIPS_CALL_LO16, namely %call_hi() and %call_lo()[*]. I think it'd be
simpler and more consistent to have %dtpoff_hi() and %dtpoff_lo()
instead. You'd then be able to get rid of hackery like:
> + /* %dtpoff may only be used immediately inside %hi or %lo, with no
> + other relocations. However, use inside %hi and %lo is valid even
> + with the old ABI which permits only a single relocation.
> + Similarly, %tpoff may be used inside %hi and %lo even with the
> + old ABI, but may also be used on its own. Convert these uses to
> + a single relocation and give an error for other uses. */
> + for (i = 0; i < reloc_index; i++)
I really think there should be one operator per relocation.
On the same topic, it would be nice if the %op() names and R_MIPS_THINGY
names were a bit more consistent. The link between alpha's operator
names and relocation names is much more obvious, for example.
Richard
[*] and in case there's any doubt, this is an IRIX convention, not
something we dreamt up for GNU. ;)