Closed
Description
I tried this code:
use ctor::ctor;
#[ctor]
fn testAAAA() {
println!("TEST123");
panic!();
}
pub fn test123() {
println!("TEST123");
}
I expected to see this happen:
without specifying a target everything works fine (using cargo +nightly build
)
Instead, this happened:
when i specify arm64e-apple-darwin (using: cargo +nightly build -Z build-std --target arm64e-apple-darwin
) my function seems to be removed.
compiling both as dylib
Meta
rustc --version --verbose
:
binary: rustc
commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c
commit-date: 2024-09-04
host: aarch64-apple-darwin
release: 1.81.0
LLVM version: 18.1.7
From aarch64-apple-darwin build in ghidra
whereas on the arm64e build there is no functions at all :|
CC @arttet