Skip to content

Commit

Permalink
Add support for StackMap section for ELF/Linux systems
Browse files Browse the repository at this point in the history
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
  • Loading branch information
preames committed Aug 1, 2014
1 parent 50a4005 commit 7684618
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/lib/MC/MCObjectFileInfo.cpp
Expand Up @@ -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());

}


Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Target/X86/X86AsmPrinter.cpp
Expand Up @@ -736,6 +736,8 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
}
Stubs.clear();
}

SM.serializeToStackMapSection();
}
}

Expand Down

0 comments on commit 7684618

Please sign in to comment.