mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
Rename __asan_gen_* symbols to ___asan_gen_*.
This prevents gold from printing a warning when trying to export these symbols via the asan dynamic list after ThinLTO promotes them from private symbols to external symbols with hidden visibility. Differential Revision: https://reviews.llvm.org/D49498 llvm-svn: 337428
This commit is contained in:
parent
417fb38f7f
commit
7f3dd14a90
@ -153,7 +153,7 @@ static const char *const kAsanHandleNoReturnName = "__asan_handle_no_return";
|
||||
static const int kMaxAsanStackMallocSizeClass = 10;
|
||||
static const char *const kAsanStackMallocNameTemplate = "__asan_stack_malloc_";
|
||||
static const char *const kAsanStackFreeNameTemplate = "__asan_stack_free_";
|
||||
static const char *const kAsanGenPrefix = "__asan_gen_";
|
||||
static const char *const kAsanGenPrefix = "___asan_gen_";
|
||||
static const char *const kODRGenPrefix = "__odr_asan_gen_";
|
||||
static const char *const kSanCovGenPrefix = "__sancov_gen_";
|
||||
static const char *const kAsanSetShadowPrefix = "__asan_set_shadow_";
|
||||
|
@ -73,7 +73,7 @@ target triple = "arm64-apple-ios"
|
||||
@llvm.compiler.used = appending global [12 x i8*] [i8* bitcast (%struct._class_t** @"OBJC_CLASSLIST_REFERENCES_$_" to i8*), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @OBJC_METH_VAR_NAME_, i32 0, i32 0), i8* bitcast (i8** @OBJC_SELECTOR_REFERENCES_ to i8*), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @OBJC_METH_VAR_NAME_.1, i32 0, i32 0), i8* bitcast (i8** @OBJC_SELECTOR_REFERENCES_.2 to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @OBJC_METH_VAR_NAME_.3, i32 0, i32 0), i8* bitcast (i8** @OBJC_SELECTOR_REFERENCES_.4 to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @OBJC_CLASS_NAME_, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @OBJC_METH_VAR_NAME_.5, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @OBJC_METH_VAR_TYPE_, i32 0, i32 0), i8* bitcast ({ i32, i32, [1 x %struct._objc_method] }* @"\01l_OBJC_$_CLASS_METHODS_MyObject" to i8*), i8* bitcast ([1 x i8*]* @"OBJC_LABEL_CLASS_$" to i8*)], section "llvm.metadata"
|
||||
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* @asan.module_ctor, i8* null }]
|
||||
@__asan_shadow_memory_dynamic_address = external global i64
|
||||
@__asan_gen_ = private unnamed_addr constant [34 x i8] c"2 32 16 9 imageSize 64 8 6 object\00", align 1
|
||||
@___asan_gen_ = private unnamed_addr constant [34 x i8] c"2 32 16 9 imageSize 64 8 6 object\00", align 1
|
||||
|
||||
; Function Attrs: noinline sanitize_address ssp uwtable
|
||||
define internal i8* @"\01+[MyObject doWithSize:]"(i8* %self, i8* %_cmd, [2 x double] %imageSize.coerce) #0 !dbg !14 {
|
||||
@ -91,7 +91,7 @@ entry:
|
||||
store i64 1102416563, i64* %6, !dbg !35
|
||||
%7 = add i64 %1, 8, !dbg !35
|
||||
%8 = inttoptr i64 %7 to i64*, !dbg !35
|
||||
store i64 ptrtoint ([34 x i8]* @__asan_gen_ to i64), i64* %8, !dbg !35
|
||||
store i64 ptrtoint ([34 x i8]* @___asan_gen_ to i64), i64* %8, !dbg !35
|
||||
%9 = add i64 %1, 16, !dbg !35
|
||||
%10 = inttoptr i64 %9 to i64*, !dbg !35
|
||||
store i64 ptrtoint (i8* (i8*, i8*, [2 x double])* @"\01+[MyObject doWithSize:]" to i64), i64* %10, !dbg !35
|
||||
|
@ -15,9 +15,9 @@ target triple = "i686-pc-win32"
|
||||
|
||||
@c = global { i8, [63 x i8] } { i8 42, [63 x i8] zeroinitializer }, align 32
|
||||
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }]
|
||||
@__asan_gen_ = private constant [7 x i8] c"asan.c\00", align 1
|
||||
@__asan_gen_1 = private unnamed_addr constant [2 x i8] c"c\00", align 1
|
||||
@0 = internal global [1 x { i32, i32, i32, i32, i32, i32 }] [{ i32, i32, i32, i32, i32, i32 } { i32 ptrtoint ({ i8, [63 x i8] }* @c to i32), i32 1, i32 64, i32 ptrtoint ([2 x i8]* @__asan_gen_1 to i32), i32 ptrtoint ([7 x i8]* @__asan_gen_ to i32), i32 0 }]
|
||||
@___asan_gen_ = private constant [7 x i8] c"asan.c\00", align 1
|
||||
@___asan_gen_1 = private unnamed_addr constant [2 x i8] c"c\00", align 1
|
||||
@0 = internal global [1 x { i32, i32, i32, i32, i32, i32 }] [{ i32, i32, i32, i32, i32, i32 } { i32 ptrtoint ({ i8, [63 x i8] }* @c to i32), i32 1, i32 64, i32 ptrtoint ([2 x i8]* @___asan_gen_1 to i32), i32 ptrtoint ([7 x i8]* @___asan_gen_ to i32), i32 0 }]
|
||||
@llvm.global_dtors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_dtor }]
|
||||
|
||||
define internal void @asan.module_ctor() {
|
||||
|
@ -54,8 +54,8 @@
|
||||
|
||||
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }]
|
||||
@__asan_option_detect_stack_use_after_return = external global i32
|
||||
@__asan_gen_ = private unnamed_addr constant [11 x i8] c"1 32 8 1 A\00", align 1
|
||||
@__asan_gen_1 = private unnamed_addr constant [13 x i8] c"1 32 1 3 tmp\00", align 1
|
||||
@___asan_gen_ = private unnamed_addr constant [11 x i8] c"1 32 8 1 A\00", align 1
|
||||
@___asan_gen_1 = private unnamed_addr constant [13 x i8] c"1 32 1 3 tmp\00", align 1
|
||||
|
||||
; Function Attrs: noreturn sanitize_address
|
||||
define i32 @_Z3fn1v() #0 !dbg !22 {
|
||||
@ -78,7 +78,7 @@ entry:
|
||||
store i64 1102416563, i64* %9, !dbg !39
|
||||
%10 = add i64 %6, 8, !dbg !39
|
||||
%11 = inttoptr i64 %10 to i64*, !dbg !39
|
||||
store i64 ptrtoint ([11 x i8]* @__asan_gen_ to i64), i64* %11, !dbg !39
|
||||
store i64 ptrtoint ([11 x i8]* @___asan_gen_ to i64), i64* %11, !dbg !39
|
||||
%12 = add i64 %6, 16, !dbg !39
|
||||
%13 = inttoptr i64 %12 to i64*, !dbg !39
|
||||
store i64 ptrtoint (i32 ()* @_Z3fn1v to i64), i64* %13, !dbg !39
|
||||
@ -136,7 +136,7 @@ entry:
|
||||
store i64 1102416563, i64* %9, !dbg !48
|
||||
%10 = add i64 %6, 8, !dbg !48
|
||||
%11 = inttoptr i64 %10 to i64*, !dbg !48
|
||||
store i64 ptrtoint ([13 x i8]* @__asan_gen_1 to i64), i64* %11, !dbg !48
|
||||
store i64 ptrtoint ([13 x i8]* @___asan_gen_1 to i64), i64* %11, !dbg !48
|
||||
%12 = add i64 %6, 16, !dbg !48
|
||||
%13 = inttoptr i64 %12 to i64*, !dbg !48
|
||||
store i64 ptrtoint (void (%struct.C*)* @_ZN1C5m_fn3Ev to i64), i64* %13, !dbg !48
|
||||
|
@ -20,7 +20,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
@__asan_mapping_offset = linkonce_odr constant i64 2147450880
|
||||
@__asan_mapping_scale = linkonce_odr constant i64 3
|
||||
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }]
|
||||
@__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 5 .addr \00", align 1
|
||||
@___asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 5 .addr \00", align 1
|
||||
|
||||
; Function Attrs: sanitize_address uwtable
|
||||
define void @_Z4funci(%struct.A* noalias sret %agg.result, i32) #0 "stack-protector-buffer-size"="1" !dbg !4 {
|
||||
@ -33,7 +33,7 @@ entry:
|
||||
store i64 1102416563, i64* %4
|
||||
%5 = add i64 %1, 8
|
||||
%6 = inttoptr i64 %5 to i64*
|
||||
store i64 ptrtoint ([16 x i8]* @__asan_gen_ to i64), i64* %6
|
||||
store i64 ptrtoint ([16 x i8]* @___asan_gen_ to i64), i64* %6
|
||||
%7 = add i64 %1, 16
|
||||
%8 = inttoptr i64 %7 to i64*
|
||||
store i64 ptrtoint (void (%struct.A*, i32)* @_Z4funci to i64), i64* %8
|
||||
|
@ -48,7 +48,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 1, void ()* @asan.module_ctor }]
|
||||
@__asan_option_detect_stack_use_after_return = external global i32
|
||||
@__asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 6 y.addr\00", align 1
|
||||
@___asan_gen_ = private unnamed_addr constant [16 x i8] c"1 32 4 6 y.addr\00", align 1
|
||||
|
||||
; Function Attrs: nounwind sanitize_address uwtable
|
||||
define i32 @_Z3bari(i32 %y) #0 !dbg !4 {
|
||||
@ -71,7 +71,7 @@ entry:
|
||||
store i64 1102416563, i64* %9
|
||||
%10 = add i64 %6, 8
|
||||
%11 = inttoptr i64 %10 to i64*
|
||||
store i64 ptrtoint ([16 x i8]* @__asan_gen_ to i64), i64* %11
|
||||
store i64 ptrtoint ([16 x i8]* @___asan_gen_ to i64), i64* %11
|
||||
%12 = add i64 %6, 16
|
||||
%13 = inttoptr i64 %12 to i64*
|
||||
store i64 ptrtoint (i32 (i32)* @_Z3bari to i64), i64* %13
|
||||
|
@ -5,5 +5,5 @@
|
||||
@__llvm_gcov_ctr = internal global [1 x i64] zeroinitializer
|
||||
|
||||
; CHECK-DAG: @asan.module_ctor
|
||||
; CHECK-NOT: @__asan_gen{{.*}}__llvm_gcov_ctr
|
||||
; CHECK-NOT: @__asan_gen{{.*}}__profc_test
|
||||
; CHECK-NOT: @___asan_gen{{.*}}__llvm_gcov_ctr
|
||||
; CHECK-NOT: @___asan_gen{{.*}}__profc_test
|
||||
|
@ -18,9 +18,9 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
; CHECK: @.str = internal unnamed_addr constant { [14 x i8], [50 x i8] } { [14 x i8] c"Hello, world!\00", [50 x i8] zeroinitializer }, comdat($".str${{[01-9a-f]+}}"), align 32
|
||||
|
||||
; Check emitted location descriptions:
|
||||
; CHECK: [[VARNAME:@__asan_gen_.[0-9]+]] = private unnamed_addr constant [7 x i8] c"global\00", align 1
|
||||
; CHECK: [[FILENAME:@__asan_gen_.[0-9]+]] = private unnamed_addr constant [22 x i8] c"/tmp/asan-globals.cpp\00", align 1
|
||||
; CHECK: [[LOCDESCR:@__asan_gen_.[0-9]+]] = private unnamed_addr constant { [22 x i8]*, i32, i32 } { [22 x i8]* [[FILENAME]], i32 5, i32 5 }
|
||||
; CHECK: [[VARNAME:@___asan_gen_.[0-9]+]] = private unnamed_addr constant [7 x i8] c"global\00", align 1
|
||||
; CHECK: [[FILENAME:@___asan_gen_.[0-9]+]] = private unnamed_addr constant [22 x i8] c"/tmp/asan-globals.cpp\00", align 1
|
||||
; CHECK: [[LOCDESCR:@___asan_gen_.[0-9]+]] = private unnamed_addr constant { [22 x i8]*, i32, i32 } { [22 x i8]* [[FILENAME]], i32 5, i32 5 }
|
||||
; CHECK: @__asan_global_global = {{.*}}i64 ptrtoint ({ i32, [60 x i8] }* @global to i64){{.*}} section "asan_globals"{{.*}}, !associated
|
||||
; CHECK: @__asan_global_.str = {{.*}}i64 ptrtoint ({ [14 x i8], [50 x i8] }* @.str to i64){{.*}} section "asan_globals"{{.*}}, !associated
|
||||
|
||||
|
@ -18,9 +18,9 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
; CHECK: @.str = internal unnamed_addr constant { [14 x i8], [50 x i8] } { [14 x i8] c"Hello, world!\00", [50 x i8] zeroinitializer }{{.*}}, align 32
|
||||
|
||||
; Check emitted location descriptions:
|
||||
; CHECK: [[VARNAME:@__asan_gen_.[0-9]+]] = private unnamed_addr constant [7 x i8] c"global\00", align 1
|
||||
; CHECK: [[FILENAME:@__asan_gen_.[0-9]+]] = private unnamed_addr constant [22 x i8] c"/tmp/asan-globals.cpp\00", align 1
|
||||
; CHECK: [[LOCDESCR:@__asan_gen_.[0-9]+]] = private unnamed_addr constant { [22 x i8]*, i32, i32 } { [22 x i8]* [[FILENAME]], i32 5, i32 5 }
|
||||
; CHECK: [[VARNAME:@___asan_gen_.[0-9]+]] = private unnamed_addr constant [7 x i8] c"global\00", align 1
|
||||
; CHECK: [[FILENAME:@___asan_gen_.[0-9]+]] = private unnamed_addr constant [22 x i8] c"/tmp/asan-globals.cpp\00", align 1
|
||||
; CHECK: [[LOCDESCR:@___asan_gen_.[0-9]+]] = private unnamed_addr constant { [22 x i8]*, i32, i32 } { [22 x i8]* [[FILENAME]], i32 5, i32 5 }
|
||||
|
||||
; Check that location descriptors and global names were passed into __asan_register_globals:
|
||||
; CHECK: i64 ptrtoint ([7 x i8]* [[VARNAME]] to i64)
|
||||
|
@ -7,7 +7,7 @@ target triple = "x86_64-unknown-linux-gnu"
|
||||
; If a global is present, __asan_[un]register_globals should be called from
|
||||
; module ctor/dtor
|
||||
|
||||
; CHECK: @__asan_gen_ = private constant [8 x i8] c"<stdin>\00", align 1
|
||||
; CHECK: @___asan_gen_ = private constant [8 x i8] c"<stdin>\00", align 1
|
||||
; CHECK: llvm.global_ctors
|
||||
; CHECK: llvm.global_dtors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user