Skip to content

Commit

Permalink
Switch ia32 ABI for ShimLock to cdecl
Browse files Browse the repository at this point in the history
Previously this was sysv64. As of Rust 1.83, this is rejected by the compiler as
incompatible with an i386 target.
  • Loading branch information
nicholasbishop committed Nov 28, 2024
1 parent 637a2e1 commit 8e90994
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion uefi/src/proto/shim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 8e90994

Please sign in to comment.