This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix 64-bit Solaris 2/x86 IE TLS code sequence
"H.J. Lu" <hjl.tools@gmail.com> writes:
> It is a Sun linker bug. TLS spec has an example of IE->LE code transition from
>
> addq foo@gottpoff(%rip), %reg
>
> to
>
> leaq foo(%reg), %reg
Not really: the spec explicitly calls for %rax here, not any reg. This
is what GCC violates.
> But the Sun linker performs
>
> movq foo@gottpoff(%rip), %reg
>
> to
>
> leaq foo(%reg), %reg
>
> It is completely bogus.
In a way, it's a case of garbage in, garbage out. I fully agree that
Sun ld needs to be more careful here, though.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University