[GHC] #8405: experiment with using function-sections for linking (for smaller libs and executables)
GHC
ghc-devs at haskell.org
Wed Sep 9 23:37:55 UTC 2015
#8405: experiment with using function-sections for linking (for smaller libs and
executables)
-------------------------------------+-------------------------------------
Reporter: carter | Owner: olsner
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:
-------------------------------------+-------------------------------------
Changes (by olsner):
* owner: => olsner
Comment:
It seems GNU ld actually has scalability issues with very large numbers of
sections too, unfortunately. Found out because I was building libHSghc
with split sections, and getting 10 minute link times on some test cases
with plugins linking statically against ghc... Since split-objs is
specifically disabled for that code I simply disabled split-sections as
well.
A much cleaned up version of the patch now at
https://github.com/olsner/ghc/commits/function-sections-2 - this adds a
-split-sections flag that controls the splitting when compiling Haskell
code. --gc-sections is always added to the linker command line. (Vague
rationale being that after building libraries with split sections, we'll
want to bring space savings to users without manual steps or extra flags
building their programs/libraries.)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8405#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list