Allow -dead_strip linking on platforms with .subsections_via_symbols
authorMoritz Angermann <moritz@lichtzwerge.de>
Wed, 19 Nov 2014 22:38:22 +0000 (16:38 -0600)
committerAustin Seipp <austin@well-typed.com>
Wed, 19 Nov 2014 23:03:06 +0000 (17:03 -0600)
commit53a4742d037da2bfd00d1d34a8ea0d49d4cdb490
tree1922721e21e3b6618ff9b7184d9dc96e9145e535
parent146dd138e2c3b4ec9b211dcbcedf752aeb79d3d1
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@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
13 files changed:
compiler/NOTES [new file with mode: 0644]
compiler/llvmGen/LlvmCodeGen/Ppr.hs
compiler/nativeGen/PPC/Ppr.hs
compiler/nativeGen/SPARC/Ppr.hs
compiler/nativeGen/X86/Ppr.hs
testsuite/tests/llvm/should_run/Makefile [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/Makefile [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/SubsectionsViaSymbols.hs [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/all.T [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/subsections_via_symbols-libtool-quiet [new file with mode: 0755]
testsuite/tests/llvm/should_run/subsections_via_symbols/subsections_via_symbols.m [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/subsections_via_symbols.stderr [new file with mode: 0644]
testsuite/tests/llvm/should_run/subsections_via_symbols/subsections_via_symbols.stdout [new file with mode: 0644]