[build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld
Uros Bizjak
ubizjak@gmail.com
Tue May 24 18:07:00 GMT 2011
On Tue, May 24, 2011 at 6:42 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Uros Bizjak <ubizjak@gmail.com> writes:
>
>>> Assembler: eh_globals.cc
>>> "/var/tmp//ccJ1MA8h.s", line 17 : Syntax error
>>> Near line: " call __tls_get_addr(%rip)@plt"
>>> "/var/tmp//ccJ1MA8h.s", line 38 : Syntax error
>>> Near line: " call __tls_get_addr(%rip)@plt"
>>> make[9]: *** [eh_globals.lo] Error 1
>>
>> Bah. %P has a special handling that removes (%rip). Are you sure Sun
>> assembler requests @plt in PIC and non-PIC cases? Can we solve this
>
> Pretty much so: my first attempts to resolve this consisted in taking
> the regular gcc assembler output and mangling it until it worked with ld.
>
>> with TARGET_SUN_TLS somehow?
>
> We could certainly duplicate (some of) the logic that %P already uses,
> but I though it easier to just introduce a straightforward variant (%p)
> instead. It's not pretty, but it worked.
OK then... can you propose a new patch, please, changing as little of
generic code as possible?
Uros.
More information about the Gcc-patches
mailing list