File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
rustc_codegen_llvm/src/back Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ fn prepare_lto(
70
70
symbols_below_threshold. extend ( msan_weak_symbols. into_iter ( ) . map ( |sym| sym. to_owned ( ) ) ) ;
71
71
}
72
72
73
+ // Preserve LLVM-injected, ASAN-related symbols.
74
+ // See also https://github.com/rust-lang/rust/issues/113404.
75
+ symbols_below_threshold. push ( c"___asan_globals_registered" . to_owned ( ) ) ;
76
+
73
77
// __llvm_profile_counter_bias is pulled in at link time by an undefined reference to
74
78
// __llvm_profile_runtime, therefore we won't know until link time if this symbol
75
79
// should have default visibility.
Original file line number Diff line number Diff line change @@ -1226,12 +1226,6 @@ extern "C" void LLVMRustPrintPasses() {
1226
1226
extern " C" void LLVMRustRunRestrictionPass (LLVMModuleRef M, char **Symbols,
1227
1227
size_t Len) {
1228
1228
auto PreserveFunctions = [=](const GlobalValue &GV) {
1229
- // Preserve LLVM-injected, ASAN-related symbols.
1230
- // See also https://github.com/rust-lang/rust/issues/113404.
1231
- if (GV.getName () == " ___asan_globals_registered" ) {
1232
- return true ;
1233
- }
1234
-
1235
1229
// Preserve symbols exported from Rust modules.
1236
1230
for (size_t I = 0 ; I < Len; I++) {
1237
1231
if (GV.getName () == Symbols[I]) {
You can’t perform that action at this time.
0 commit comments