llvm.org GIT mirror llvm / 3d4a0e7
[asan] Do not instrument globals in the special "LLVM" sections git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261794 91177308-0d34-0410-b5e6-96231b3b80d8 Anna Zaks 4 years ago
2 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
12271227 // Globals from llvm.metadata aren't emitted, do not instrument them.
12281228 if (Section == "llvm.metadata") return false;
12291229 // Do not instrument globals from special LLVM sections.
1230 if (Section.find("__llvm") != StringRef::npos) return false;
1230 if (Section.find("__llvm") != StringRef::npos || Section.find("__LLVM") != StringRef::npos) return false;
12311231
12321232 // Do not instrument function pointers to initialization and termination
12331233 // routines: dynamic linker will not properly handle redzones.
1010
1111 @.str_noinst = private unnamed_addr constant [4 x i8] c"aaa\00", section "llvm.metadata"
1212 @.str_noinst_prof = private unnamed_addr constant [4 x i8] c"aaa\00", section "__DATA,__llvm_covmap"
13 @.str_noinst_LLVM = private unnamed_addr constant [4 x i8] c"aaa\00", section "__LLVM,__not_visible"
1314 @.str_inst = private unnamed_addr constant [4 x i8] c"aaa\00"
1415
1516 ; CHECK-NOT: {{asan_gen.*str_noinst}}
1617 ; CHECK-NOT: {{asan_gen.*str_noinst_prof}}
18 ; CHECK-NOT: {{asan_gen.*str_noinst_LLVM}}
1719 ; CHECK: {{asan_gen.*str_inst}}
1820 ; CHECK: @asan.module_ctor