Open
Description
Using cargo-binutils
to see disassembly along with source on embedded ARM targets (thumbv7em-none-eabihf
in this case), it can't seem to find core
/compiler_builtins
source properly. It doesn't reproduce when compiling a native project and using the same disassembly commands. I get warnings along the lines of: llvm-objdump: warning: 'usb_echo': failed to find source /rustc/(..)/library/core/src/option.rs
.
For the below errors, I ran the following command in the crate atsamd/boards/feather_m4
:
cargo objdump --example usb_echo --all-features --release -- --disassemble --no-show-raw-insn -gS
warnings/errors seen
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/option.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/slice/index.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/const_ptr.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mod.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/iter/range.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/cell.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/num/int_macros.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/cmp.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/result.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/ptr/mut_ptr.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/fmt/mod.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/fmt/builders.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/intrinsics.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/array/mod.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/sync/atomic.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/num/uint_macros.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/slice/iter/macros.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/clone.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/str/iter.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/str/validations.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/char/methods.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source ./asm/inline.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source ./asm/lib.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.49/src/arm.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.49/src/mem/mod.rs
/PATH/TO/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin/llvm-objdump: warning: 'usb_echo': failed to find source /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.49/src/mem/impls.rs
The same does not occur if I run the exact same command in a native crate, like this one.
Meta
rustc --version --verbose
:
rustc 1.56.1 (59eed8a2a 2021-11-01)
binary: rustc
commit-hash: 59eed8a2aac0230a8b53e89d4e99d55912ba6b35
commit-date: 2021-11-01
host: aarch64-apple-darwin
release: 1.56.1
LLVM version: 13.0.0
rustup show
:
Default host: aarch64-apple-darwin
rustup home: /PATH/TO/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin
installed targets for active toolchain
--------------------------------------
aarch64-apple-darwin
thumbv6m-none-eabi
thumbv7em-none-eabi
thumbv7em-none-eabihf
thumbv7m-none-eabi
active toolchain
----------------
stable-aarch64-apple-darwin (default)
rustc 1.56.1 (59eed8a2a 2021-11-01)