summaryrefslogtreecommitdiff
path: root/lib
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
commit9cfd368302666f38a317df64c68e33abdd6ecdee (patch)
tree3337f9762b872971ea760df0ed15d0192d27bbaf /lib
parent1d5a2ad8a63c2a45ab12fb76a7381fe5dfe187ac (diff)
downloadllvm-9cfd368302666f38a317df64c68e33abdd6ecdee.tar.gz
llvm-9cfd368302666f38a317df64c68e33abdd6ecdee.tar.bz2
llvm-9cfd368302666f38a317df64c68e33abdd6ecdee.tar.xz
ARM64: don't emit .subsections_via_symbols on ELF.
Part of PR19455. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM64/ARM64AsmPrinter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Target/ARM64/ARM64AsmPrinter.cpp b/lib/Target/ARM64/ARM64AsmPrinter.cpp
index 09dbf55e3f..9ea00c8a93 100644
--- a/lib/Target/ARM64/ARM64AsmPrinter.cpp
+++ b/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()) {