[GHC] #8405: experiment with using function-sections for linking (for smaller libs and executables)

GHC ghc-devs at haskell.org
Sat Nov 21 12:43:08 UTC 2015


#8405: experiment with using function-sections for linking (for smaller libs and
executables)
-------------------------------------+-------------------------------------
        Reporter:  carter            |                Owner:  olsner
            Type:  task              |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.6.3
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1242
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Tamar Christina <tamar@…>):

 In [changeset:"7f77e4e9b301493db0782cf2d129cf62dbcd5af6/ghc" 7f77e4e/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="7f77e4e9b301493db0782cf2d129cf62dbcd5af6"
 Fix Windows builds after D1242

 Summary:
 Only use the merge_sections.ld linker script if SplitSections is enabled.

 I thought I had a way to make the linker script actually work on Windows
 and produce object files instead of image files (by using the "INSERT
 AFTER"
 linker script command to get the default script's output format setting),
 but that fix caused ghci to crash with an illegal instruction on startup.

 Gave up and made a simpler fix of just disabling this for normal builds,
 as it's only really relevant with SplitSections enabled anyway.

 Reviewers: austin, thomie, bgamari

 Reviewed By: austin, thomie

 Subscribers: Phyx, thomie

 Differential Revision: https://phabricator.haskell.org/D1505

 GHC Trac Issues: #8405
 }}}

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


More information about the ghc-tickets mailing list