This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TLS support for MIPS


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. ;)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]