While investigating the Solaris 11/x86 testsuite results, I noticed that some 
64-bit libgomp test cases were failing.  The failure boils down to the attached
tie.c program.

If compiled/linked with GNU as/Sun ld, the resulting binary SEGVs:

$ gcc -m64 -fopenmp -o tie.sun tie.c
$ ./tie.sun
Segmentation Fault

If instead GNU as and ld are used, everything works fine:

$ gcc -m64 -fopenmp -o tie.gnu tie.c
$ ./tie.gnu
$ 

As described in an initial patch submission, it turns out that the amd64 TLS
IE code sequence emitted by gcc doesn't follow the published Solaris 2 ABI,
nor the current `ELF Handling for Thread-Local Storage' spec at

  http://people.redhat.com/drepper/tls.pdf

While GNU ld copes with that just fine, Sun ld cannot handle this and breaks
the code emitted by gcc.


-- 
           Summary: amd64 TLS IE code sequence on Solaris 2/x86 violates
                    spec
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at gcc dot gnu dot org
 GCC build triplet: i386-pc-solaris2.11
  GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43309

Reply via email to