[llvm] r214538 - Add support for StackMap section for ELF/Linux systems
Philip Reames
listmail at philipreames.com
Fri Aug 1 11:47:09 PDT 2014
Author: reames
Date: Fri Aug 1 13:47:09 2014
New Revision: 214538
URL: http://llvm.org/viewvc/llvm-project?rev=214538&view=rev
Log:
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
Modified:
llvm/trunk/lib/MC/MCObjectFileInfo.cpp
llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=214538&r1=214537&r2=214538&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Fri Aug 1 13:47:09 2014
@@ -583,6 +583,12 @@ void MCObjectFileInfo::InitELFMCObjectFi
DwarfAddrSection =
Ctx->getELFSection(".debug_addr", ELF::SHT_PROGBITS, 0,
SectionKind::getMetadata());
+
+ StackMapSection =
+ Ctx->getELFSection(".llvm_stackmaps", ELF::SHT_PROGBITS,
+ ELF::SHF_ALLOC,
+ SectionKind::getMetadata());
+
}
Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=214538&r1=214537&r2=214538&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Fri Aug 1 13:47:09 2014
@@ -736,6 +736,8 @@ void X86AsmPrinter::EmitEndOfAsmFile(Mod
}
Stubs.clear();
}
+
+ SM.serializeToStackMapSection();
}
}
More information about the llvm-commits
mailing list