As far as I can tell, it is failing when trying to read the .o file inside target/thumbv7m-none-eabi/release/deps/libcompiler_builtins-7f005ebede32330f.rlib, because it is LLVM IR bitcode, not an ELF file
$ ar x target/thumbv7m-none-eabi/release/deps/libcompiler_builtins-7f005ebede32330f.rlib
$ file compiler_builtins-7f005ebede32330f.compiler_builtins.5df481aafd5f48ed-cgu.0.rcgu.o
compiler_builtins-7f005ebede32330f.compiler_builtins.5df481aafd5f48ed-cgu.0.rcgu.o: LLVM IR bitcode
I don't really understand what https://github.com/rust-lang/rust/pull/113923 is doing, and weren't able to find configuration flags that would make rustc revert back to creating ELF file for compiler_builtins. Any suggestions for a fix or workaround would be appreciated.
When running
cargo call-stack
using the latest nightly, it fails witherror: Did not find ELF magic number
.Repro steps:
rustup install nightly-2023-12-02
rustup component add rust-src --toolchain nightly-2023-12-02-x86_64-unknown-linux-gnu
cd cargo-call-stack/firmware
cargo +nightly-2023-12-02 call-stack --example function-pointer --target thumbv7m-none-eabi > cg.dot
cargo bisect-rustc
shows the culprit as https://github.com/rust-lang/rust/commit/8c2b57721728233e074db69d93517614de338055As far as I can tell, it is failing when trying to read the
.o
file insidetarget/thumbv7m-none-eabi/release/deps/libcompiler_builtins-7f005ebede32330f.rlib
, because it is LLVM IR bitcode, not an ELF fileI don't really understand what https://github.com/rust-lang/rust/pull/113923 is doing, and weren't able to find configuration flags that would make rustc revert back to creating ELF file for
compiler_builtins
. Any suggestions for a fix or workaround would be appreciated.