Closed keredson closed 1 month ago
$ objdump -d /tmp/test-linking-idfv4/target/xtensa-esp32-espidf/debug/deps/liblibssh_rs_sys-ba33b208cf49f79d.rlib
looks OK, but admittedly i'm out of my depth here.
actually the start of objdump
contains:
In archive /tmp/test-linking-idfv4/target/xtensa-esp32-espidf/debug/deps/liblibssh_rs_sys-ba33b208cf49f79d.rlib:
lib.rmeta: file format elf32-little
libssh_rs_sys-ba33b208cf49f79d.libssh_rs_sys.f63cc42efaec27b7-cgu.0.rcgu.o: file format elf32-little
1fa44eb5313ef680-agent.o: file format elf64-x86-64
it prob. shouldn't contain elf64-x86-64
objects? no clue if this i related, but thought i'd note.
actually the start of
objdump
contains:In archive /tmp/test-linking-idfv4/target/xtensa-esp32-espidf/debug/deps/liblibssh_rs_sys-ba33b208cf49f79d.rlib: lib.rmeta: file format elf32-little libssh_rs_sys-ba33b208cf49f79d.libssh_rs_sys.f63cc42efaec27b7-cgu.0.rcgu.o: file format elf32-little 1fa44eb5313ef680-agent.o: file format elf64-x86-64
it prob. shouldn't contain
elf64-x86-64
objects? no clue if this i related, but thought i'd note.
Of course it is. The lib likely has some x86 assembly hard-coded. Not sure all of this is a problem with the esp idf crates.
Bug description
Adding and using the library
libssh-rs
leads to the linker throwing.rlib: error adding symbols: file format not recognized
.To Reproduce
Steps to reproduce the behavior:
.cargo/config.toml
:src/main.rs
(obviously the second line goes in the main function)