From d7191b14c1d893558287817193d766d6482e50e9 Mon Sep 17 00:00:00 2001 From: Adam Schwalm Date: Mon, 6 Jan 2020 10:22:30 -0600 Subject: [PATCH] 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. --- src/probestack.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/probestack.rs b/src/probestack.rs index 70b33b8..3797df0 100644 --- a/src/probestack.rs +++ b/src/probestack.rs @@ -75,8 +75,22 @@ macro_rules! define_rust_probestack { }; } -// Same as above, but for Mach-O. -#[cfg(any(target_vendor = "apple", target_os = "uefi"))] +#[cfg(target_os = "uefi")] +macro_rules! define_rust_probestack { + ($body: expr) => { + concat!( + " + .globl __rust_probestack + __rust_probestack: + ", + $body + ) + }; +} + +// Same as above, but for Mach-O. Note that the triple underscore +// is deliberate +#[cfg(target_vendor = "apple")] macro_rules! define_rust_probestack { ($body: expr) => { concat!(