[JMCInstrument] rename ELF section name from ".just.my.code" to ".data.just.my.code"
This gives linker scripts a hint about where to place the section.
This commit is contained in:
parent
fcd7717ddf
commit
24c6ea917c
|
@ -151,7 +151,7 @@ bool JMCInstrumenter::runOnModule(Module &M) {
|
||||||
bool IsELF = ModuleTriple.isOSBinFormatELF();
|
bool IsELF = ModuleTriple.isOSBinFormatELF();
|
||||||
assert((IsELF || IsMSVC) && "Unsupported triple for JMC");
|
assert((IsELF || IsMSVC) && "Unsupported triple for JMC");
|
||||||
bool UseX86FastCall = IsMSVC && ModuleTriple.getArch() == Triple::x86;
|
bool UseX86FastCall = IsMSVC && ModuleTriple.getArch() == Triple::x86;
|
||||||
const char *const FlagSymbolSection = IsELF ? ".just.my.code" : ".msvcjmc";
|
const char *const FlagSymbolSection = IsELF ? ".data.just.my.code" : ".msvcjmc";
|
||||||
|
|
||||||
GlobalValue *CheckFunction = nullptr;
|
GlobalValue *CheckFunction = nullptr;
|
||||||
DenseMap<DISubprogram *, Constant *> SavedFlags(8);
|
DenseMap<DISubprogram *, Constant *> SavedFlags(8);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; RUN: opt -jmc-instrument -mtriple=x86_64-unknown-linux-gnu -S < %s | FileCheck %s
|
; RUN: opt -jmc-instrument -mtriple=x86_64-unknown-linux-gnu -S < %s | FileCheck %s
|
||||||
|
|
||||||
; CHECK: @"__7DF23CF5_x@c" = internal unnamed_addr global i8 1, section ".just.my.code", align 1, !dbg !0
|
; CHECK: @"__7DF23CF5_x@c" = internal unnamed_addr global i8 1, section ".data.just.my.code", align 1, !dbg !0
|
||||||
; CHECK: @"__A8764FDD_x@c" = internal unnamed_addr global i8 1, section ".just.my.code", align 1, !dbg !5
|
; CHECK: @"__A8764FDD_x@c" = internal unnamed_addr global i8 1, section ".data.just.my.code", align 1, !dbg !5
|
||||||
|
|
||||||
; CHECK: define void @l1() !dbg !12 {
|
; CHECK: define void @l1() !dbg !12 {
|
||||||
; CHECK: call void @__CheckForDebuggerJustMyCode(ptr noundef @"__7DF23CF5_x@c")
|
; CHECK: call void @__CheckForDebuggerJustMyCode(ptr noundef @"__7DF23CF5_x@c")
|
||||||
|
|
Loading…
Reference in New Issue