Open fyhong opened 1 year ago
请提供具体的可复现步骤,如依次执行了哪些命令。
我用的是docker docker pull messense/rust-musl-cross:mipsel-musl-amd64 docker run --rm -it -v /root/cross:/home messense/rust-musl-cross:arm-musleabi-amd64 然后直接在里面运行cargo build -r
From the log, the build failed at the linking process and the linker used is /usr/bin/ld
, which is probably the system linker. And the message suggests that the object file's format cannot be read by this linker, so an appropriate linker is needed.
It turns out that you may need to tell cargo which linker to use when doing cross-compiling, or it falls back to the system default. Try passing --config target.$TARGET.linker=\"rust-lld\"
to cargo.
请提供具体的可复现步骤,如依次执行了哪些命令。 在阿里云ecs上查杀说有后门
我按照dock里面的命令编译,每次到最后都是显示以下错误。请问这是什么原因
l/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: Relocations in generic ELF (EM: 8) /root/rathole/target/mipsel-unknown-linux-musl/minimal/deps/rathole-1f0d7368773e6686.rathole.90b39da2-cgu.0.rcgu.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status