diff --git a/xtask/src/symbols.rs b/xtask/src/symbols.rs index f1cec36f..b5809c05 100644 --- a/xtask/src/symbols.rs +++ b/xtask/src/symbols.rs @@ -23,6 +23,9 @@ pub fn exported>(binary: P, symbol: &str) -> Result { goblin::mach::Mach::Binary(obj) => obj, }; + // XXX: Why are all exported symbols on macOS prefixed with an underscore? + let symbol = format!("_{}", symbol); + Ok(obj.exports()?.into_iter().any(|sym| sym.name == symbol)) } goblin::Object::PE(obj) => Ok(obj.exports.iter().any(|sym| sym.name == Some(symbol))),