diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-08-28 18:05:47 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-08-28 19:36:51 +0000 |
| commit | 23e72ab41e27842eae0d60a6f4750c5151aabcbc (patch) | |
| tree | 724de3863bbb0542a0652706a65523ad2a1d3503 /compiler/rustc_codegen_llvm/src | |
| parent | d76cff3f06f4de2e760eee3130c8a393fa4a124f (diff) | |
| download | rust-23e72ab41e27842eae0d60a6f4750c5151aabcbc.tar.gz rust-23e72ab41e27842eae0d60a6f4750c5151aabcbc.zip | |
Move ___asan_globals_registered export
All other sanitizer symbols are handled in prepare_lto already.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/lto.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs index 551a448d97c..fc38c4f3e51 100644 --- a/compiler/rustc_codegen_llvm/src/back/lto.rs +++ b/compiler/rustc_codegen_llvm/src/back/lto.rs @@ -70,6 +70,10 @@ fn prepare_lto( symbols_below_threshold.extend(msan_weak_symbols.into_iter().map(|sym| sym.to_owned())); } + // Preserve LLVM-injected, ASAN-related symbols. + // See also https://github.com/rust-lang/rust/issues/113404. + symbols_below_threshold.push(c"___asan_globals_registered".to_owned()); + // __llvm_profile_counter_bias is pulled in at link time by an undefined reference to // __llvm_profile_runtime, therefore we won't know until link time if this symbol // should have default visibility. |
