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

GHC ghc-devs at haskell.org
Tue Sep 8 22:38:05 UTC 2015


#8405: experiment with using function-sections for linking (for smaller libs and
executables)
-------------------------------------+-------------------------------------
        Reporter:  carter            |                   Owner:
            Type:  task              |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.6.3
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by olsner):

 Comparing the size of libraries/*/dist-install/build/*.a from each tree,
 the sections build was 71MB and the split objects build was 99MB, compared
 to 41MB for a non-split build. Slightly less bloat than split-objs at
 least.

 Meanwhile, I found the reason for the missing savings compared to split-
 objs: I had missed that SRT table generation was generating split or
 monolithic SRT tables depending on the split-objs flag. For now, I made
 the split SRTs unconditional (since the section splitting is also always
 on), and that made my "hello world" 10% smaller with sections than with
 split-objs (20% diff after stripping).

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


More information about the ghc-tickets mailing list