diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-11-26 17:21:12 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-27 14:25:03 -0500 |
commit | 730ac880c5dc23e0f32a2f08d89d4e5d2a583512 (patch) | |
tree | aa85ded8d0edd3d465963c8b3870b8270628ae30 /docs/users_guide | |
parent | df570d920fa66db631f936fa377e598fe92bd2a1 (diff) | |
download | haskell-wip/kill-obj-splitter.tar.gz |
Rip out object splittingwip/kill-obj-splitter
The splitter is an evil Perl script that processes assembler code.
Its job can be done better by the linker's --gc-sections flag. GHC
passes this flag to the linker whenever -split-sections is passed on
the command line.
This is based on @DemiMarie's D2768.
Fixes Trac #11315
Fixes Trac #9832
Fixes Trac #8964
Fixes Trac #8685
Fixes Trac #8629
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/8.8.1-notes.rst | 5 | ||||
-rw-r--r-- | docs/users_guide/packages.rst | 4 | ||||
-rw-r--r-- | docs/users_guide/phases.rst | 19 |
3 files changed, 8 insertions, 20 deletions
diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst index 69b9c5d536..5e854cb5d1 100644 --- a/docs/users_guide/8.8.1-notes.rst +++ b/docs/users_guide/8.8.1-notes.rst @@ -79,6 +79,11 @@ Compiler - The deprecated ghc-flag ``-Wamp`` has been removed. +- Support for object splitting with the flag ``-split-objs`` is removed. Using + this flag now results in a warning and does nothing. Use + :ghc-flag:`-split-sections` instead. + + Runtime system ~~~~~~~~~~~~~~ diff --git a/docs/users_guide/packages.rst b/docs/users_guide/packages.rst index 632162f6c8..9383b8ad68 100644 --- a/docs/users_guide/packages.rst +++ b/docs/users_guide/packages.rst @@ -1023,9 +1023,9 @@ extra indirection). ``HSfoo.o`` file that has been pre-linked. Loading the ``.o`` file is slightly quicker, but at the expense of having another copy of the compiled package. The rule of thumb is that if the modules of the - package were compiled with :ghc-flag:`-split-objs` then building the + package were compiled with :ghc-flag:`-split-sections` then building the ``HSfoo.o`` is worthwhile because it saves time when loading the - package into GHCi. Without :ghc-flag:`-split-objs`, there is not much + package into GHCi. Without :ghc-flag:`-split-sections`, there is not much difference in load time between the ``.o`` and ``.a`` libraries, so it is better to save the disk space and only keep the ``.a`` around. In a GHC distribution we provide ``.o`` files for most packages diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index f5f735b81b..0f70368047 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -732,21 +732,6 @@ for example). option for Apple's Linker (``-F`` already means something else for GHC). -.. ghc-flag:: -split-objs - :shortdesc: Split objects (for libraries) - :type: dynamic - :category: linking - - Tell the linker to split the single object file that would normally - be generated into multiple object files, one per top-level Haskell - function or type in the module. This only makes sense for libraries, - where it means that executables linked against the library are - smaller as they only link against the object files that they need. - However, assembling all the sections separately is expensive, so - this is slower than compiling normally. Additionally, the size of - the library itself (the ``.a`` file) can be a factor of 2 to 2.5 - larger. - .. ghc-flag:: -split-sections :shortdesc: Split sections for link-time dead-code stripping :type: dynamic @@ -758,9 +743,7 @@ for example). output file. When linking, the linker can automatically remove all unreferenced sections - and thus produce smaller executables. The effect is similar to - :ghc-flag:`-split-objs`, but somewhat more efficient - the generated library - files are about 30% smaller than with :ghc-flag:`-split-objs`. + and thus produce smaller executables. .. ghc-flag:: -static :shortdesc: Use static Haskell libraries |