PATCH: Fix 64-bit Solaris 2/x86 IE TLS code sequence

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Tue Mar 9 17:12:00 GMT 2010


Jakub Jelinek <jakub@redhat.com> writes:

> On Tue, Mar 09, 2010 at 08:24:29AM -0800, H.J. Lu wrote:
>> > Btw., in the meantime I've noticed that the code sequence demanded in
>> > the Solaris Linker and Libraries Guide is not in any way Sun specific,
>> > but actually still in the current version of the `ELF Handling for
>> > Thread-Local Storage' specification:
>> >
>> >        http://people.redhat.com/drepper/tls.pdf
>> >
>> > So, unless there's an updated specification somewhere, the fix might be
>> > applied more generally (which currently already happens; there's no
>> > TARGET_SUN_TLS predicate anywhere), even though GNU ld can handle the
>> > alternative code sequences produced by GCC just fine.
>
> If Sun as/ld demands something, then penalizing Linux because of it is a bad
> idea.  The GNU tls access sequences and their transitions are designed to
> be quite flexible, if you force some particular insn unnecessarily just
> because Sun as needs to have them, the generated code will be slower or
> larger than needed on Linux.

Sun as doesn't care, but Sun ld does.  The GNU tls sequences may be
flexible, but there should be some spec how they may look, apart from
the code in gcc and binutils.  I've got no problem at all restricting
this to Solaris, though.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list