https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61495

            Bug ID: 61495
           Summary: [4.10 regression] Many Go tests FAIL with fatal error:
                    runtime.SetFinalizer
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, iant at google dot com
              Host: *-*-solaris2.11
            Target: *-*-solaris2.11
             Build: *-*-solaris2.11

Between 20140516 (r210514) and 20140520 (r210655), many Go tests started to
FAIL
on Solaris 11 when using gas with /bin/ld, both SPARC and x86, 32 and 64-bit:

runtime.SetFinalizer: cannot pass *     os      os.file to finalizer func(*    
os      os.file) error
fatal error: runtime.SetFinalizer

A reghunt revealed that this patch

2014-05-17  Jan Hubicka  <hubi...@ucw.cz>

    * tree-pass.h (make_pass_ipa_comdats): New pass.
    * timevar.def (TV_IPA_COMDATS): New timevar.
    * passes.def (pass_ipa_comdats): Add.
    * Makefile.in (OBJS): Add ipa-comdats.o
    * ipa-comdats.c: New file.

Is the culprit.  This is not seen with as/ld (as requires different comdat
syntax), gas/gld, 
nor on Solaris 10 (where the necessary support to deal with comdat as emitted
by
gas is not yet present).

When linking libgo.so.5, I see many ld warnings like

ld: warning: relocation warning: R_386_32: file .libs/bytes.o: section
[149].rel.data.rel.ro.__go_td_FppN12_bytes.ReadererN5_uint8N5_erroree: symbol
C217: relocation against discarded COMDAT section [152].data.rel.C217: symbol
not found, relocation ignored

The strange thing is: if I link the objects generated by a gcc configured to
use
gas/gld with ld, the resulting libgo.so.5 and the actual testcases work fine:

  linking gld objects with gld        ok
        gld                  ld        ok
      ld           ld        bad
      ld           gld        ok

  Rainer
  Rainer

Reply via email to