diff options
author | Philip Reames <listmail@philipreames.com> | 2014-08-01 18:47:09 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2014-08-01 18:47:09 +0000 |
commit | 7684618401abb5c43a3d9be15283f381ccde35c9 (patch) | |
tree | 12d9e962761c3604f872216e972a0c0507c2a49e | |
parent | 50a4005e351c7fb9b9494e8320df3212dc8207e0 (diff) | |
download | bcm5719-llvm-7684618401abb5c43a3d9be15283f381ccde35c9.tar.gz bcm5719-llvm-7684618401abb5c43a3d9be15283f381ccde35c9.zip |
Add support for StackMap section for ELF/Linux systems
This patch adds code to emits the StackMap section on ELF systems. This section is required to support llvm.experimental.stackmap and llvm.experimental.patchpoint intrinsics.
Reviewers: ributzka, echristo
Differential Revision: http://reviews.llvm.org/D4574
llvm-svn: 214538
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86AsmPrinter.cpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index df5787c7426..da707d860a6 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -583,6 +583,12 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { DwarfAddrSection = Ctx->getELFSection(".debug_addr", ELF::SHT_PROGBITS, 0, SectionKind::getMetadata()); + + StackMapSection = + Ctx->getELFSection(".llvm_stackmaps", ELF::SHT_PROGBITS, + ELF::SHF_ALLOC, + SectionKind::getMetadata()); + } diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 3c22e883375..fc0d408fd7d 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -736,6 +736,8 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) { } Stubs.clear(); } + + SM.serializeToStackMapSection(); } } |