[commit: ghc] master: Allow -dead_strip linking on platforms with .subsections_via_symbols (53a4742)

git at git.haskell.org git at git.haskell.org
Wed Nov 19 23:03:41 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/53a4742d037da2bfd00d1d34a8ea0d49d4cdb490/ghc

>---------------------------------------------------------------

commit 53a4742d037da2bfd00d1d34a8ea0d49d4cdb490
Author: Moritz Angermann <moritz at lichtzwerge.de>
Date:   Wed Nov 19 16:38:22 2014 -0600

    Allow -dead_strip linking on platforms with .subsections_via_symbols
    
    Summary:
    This allows to link objects produced with the llvm code generator to be linked with -dead_strip. This applies to at least the iOS cross compiler and OS X compiler.
    
    Signed-off-by: Moritz Angermann <moritz at lichtzwerge.de>
    
    Test Plan: Create a ffi library and link it with -dead_strip. If the resulting binary does not crash, the patch works as advertised.
    
    Reviewers: rwbarton, simonmar, hvr, dterei, mzero, ezyang, austin
    
    Reviewed By: dterei, ezyang, austin
    
    Subscribers: thomie, mzero, simonmar, ezyang, carter
    
    Differential Revision: https://phabricator.haskell.org/D206


>---------------------------------------------------------------

53a4742d037da2bfd00d1d34a8ea0d49d4cdb490
 compiler/NOTES                                           | 16 ++++++++++++++++
 compiler/llvmGen/LlvmCodeGen/Ppr.hs                      |  8 +++++++-
 compiler/nativeGen/PPC/Ppr.hs                            |  7 +------
 compiler/nativeGen/SPARC/Ppr.hs                          |  7 +------
 compiler/nativeGen/X86/Ppr.hs                            |  7 +------
 .../should_compile => llvm/should_run}/Makefile          |  0
 .../llvm/should_run/subsections_via_symbols/Makefile     | 13 +++++++++++++
 .../subsections_via_symbols/SubsectionsViaSymbols.hs     |  5 +++++
 .../tests/llvm/should_run/subsections_via_symbols/all.T  | 15 +++++++++++++++
 .../subsections_via_symbols-libtool-quiet                |  4 ++++
 .../subsections_via_symbols/subsections_via_symbols.m    | 11 +++++++++++
 .../subsections_via_symbols.stderr                       |  0
 .../subsections_via_symbols.stdout                       |  2 ++
 13 files changed, 76 insertions(+), 19 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 53a4742d037da2bfd00d1d34a8ea0d49d4cdb490


More information about the ghc-commits mailing list