[GHC] #12748: BFD linker issue with GHCi

GHC ghc-devs at haskell.org
Wed Oct 26 03:31:39 UTC 2016


#12748: BFD linker issue with GHCi
-------------------------------------+-------------------------------------
        Reporter:  hsyl20            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
  (Linking)                          |             Keywords:
      Resolution:                    |  bfd,linker,ghci
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by hsyl20):

 * cc: bgamari (added)


Comment:

 I may have found the culprit. While investigating #12754, I obtained these
 results:
 {{{
                                      8.0.1       HEAD        HEAD (disable
 mkTypeableBinds)
 Compile time (without export list):  13.16       15.16s      12.19
 -20%
 Compile time (with    export list):  10.24s      12.06s      9.16
 -24%
 Binary size:                         5.4M        5.4M        2.5M
 -53%
 Interface size:                      888K        1.1M        498K
 -55%
 #symbols in .symtab:                 60034       60034       30017
 -50%
 #relocs in .rela.data:               60024       60024       10002
 -83%
 Size of .data section:               720272      720272      80016
 -89%
 Size of .strtab section:             887100      887100      447902
 -50%
 }}}

 For each type constructor, `mkTypeableBinds` adds:
 * The name of the constructor as a string into .rodata
   * + 1 symbol
   * n bytes, 8-byte aligned (there are two consecutives directives:
 `.align 8 .align 1` before each string)
 * A `GHC.Types.TrNameS` closure in .data
   * + 1 symbol
   * 8 bytes, 8-byte aligned too
 * A `GHC.Types.TyCon` closure in .data
   * + 1 symbol
   * 24 bytes, 8-byte aligned too

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12748#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list