summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-04-18 14:54:41 +0000
committerTim Northover <tnorthover@apple.com>2014-04-18 14:54:41 +0000
commitbe1d1b6681b28f9dd4bff0e14d4fd9aa63f90d64 (patch)
treef01069046f343b34d62b7aa1ad71fd6924494825 /llvm/lib/Target
parentbe3941cc79ea86be961ccbbd1833d0590760123f (diff)
downloadbcm5719-llvm-be1d1b6681b28f9dd4bff0e14d4fd9aa63f90d64.tar.gz
bcm5719-llvm-be1d1b6681b28f9dd4bff0e14d4fd9aa63f90d64.zip
ARM64: don't emit .subsections_via_symbols on ELF.
Part of PR19455. llvm-svn: 206610
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp b/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
index 09dbf55e3f1..9ea00c8a938 100644
--- a/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
+++ b/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
@@ -120,13 +120,15 @@ private:
//===----------------------------------------------------------------------===//
void ARM64AsmPrinter::EmitEndOfAsmFile(Module &M) {
- // Funny Darwin hack: This flag tells the linker that no global symbols
- // contain code that falls through to other global symbols (e.g. the obvious
- // implementation of multiple entry points). If this doesn't occur, the
- // linker can safely perform dead code stripping. Since LLVM never
- // generates code that does this, it is always safe to set.
- OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
- SM.serializeToStackMapSection();
+ if (Subtarget->isTargetMachO()) {
+ // Funny Darwin hack: This flag tells the linker that no global symbols
+ // contain code that falls through to other global symbols (e.g. the obvious
+ // implementation of multiple entry points). If this doesn't occur, the
+ // linker can safely perform dead code stripping. Since LLVM never
+ // generates code that does this, it is always safe to set.
+ OutStreamer.EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
+ SM.serializeToStackMapSection();
+ }
// Emit a .data.rel section containing any stubs that were created.
if (Subtarget->isTargetELF()) {
OpenPOWER on IntegriCloud