From 6994ee3a9e265bae54e3788d0592a45a1fa960da Mon Sep 17 00:00:00 2001 From: checkraisefold Date: Tue, 24 Sep 2024 17:05:44 -0700 Subject: [PATCH] Fix linking for symbols starting with ? --- compiler/rustc_codegen_ssa/src/back/symbol_export.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index 60ab291935256..25723dd1a5824 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -577,6 +577,7 @@ pub(crate) fn linking_symbol_name_for_instance_in_crate<'tcx>( } let prefix = match &target.arch[..] { + "x86" if target.is_like_windows && undecorated.starts_with("?") => return undecorated, "x86" => Some('_'), "x86_64" => None, "arm64ec" => Some('#'),