Skip to content

Commit d7191b1

Browse files
ALSchwalmalexcrichton
authored andcommitted
Add separate rust_probestack definition for uefi (#335)
This is necessary because the Mach-O definition must have the triple underscore, but the UEFI one must not.
1 parent 6de4f8f commit d7191b1

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/probestack.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,22 @@ macro_rules! define_rust_probestack {
7575
};
7676
}
7777

78-
// Same as above, but for Mach-O.
79-
#[cfg(any(target_vendor = "apple", target_os = "uefi"))]
78+
#[cfg(target_os = "uefi")]
79+
macro_rules! define_rust_probestack {
80+
($body: expr) => {
81+
concat!(
82+
"
83+
.globl __rust_probestack
84+
__rust_probestack:
85+
",
86+
$body
87+
)
88+
};
89+
}
90+
91+
// Same as above, but for Mach-O. Note that the triple underscore
92+
// is deliberate
93+
#[cfg(target_vendor = "apple")]
8094
macro_rules! define_rust_probestack {
8195
($body: expr) => {
8296
concat!(

0 commit comments

Comments
 (0)