From 8e909947d4b09d28c026a46cb84a56928bf2455d Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 28 Nov 2024 13:23:46 -0500 Subject: [PATCH] Switch ia32 ABI for ShimLock to cdecl Previously this was sysv64. As of Rust 1.83, this is rejected by the compiler as incompatible with an i386 target. --- uefi/src/proto/shim/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/uefi/src/proto/shim/mod.rs b/uefi/src/proto/shim/mod.rs index 158590bb8..e3d771ad1 100644 --- a/uefi/src/proto/shim/mod.rs +++ b/uefi/src/proto/shim/mod.rs @@ -45,7 +45,12 @@ pub struct Hashes { // These macros set the correct calling convention for the Shim protocol methods. -#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[cfg(target_arch = "x86")] +macro_rules! shim_function { + (fn $args:tt -> $return_type:ty) => (extern "cdecl" fn $args -> $return_type) +} + +#[cfg(target_arch = "x86_64")] macro_rules! shim_function { (fn $args:tt -> $return_type:ty) => (extern "sysv64" fn $args -> $return_type) }