I'm trying to run an ARM64 binary on my Kali Linux machine using Qemu user mode. This is the binary
~$ file arm_binary
arm_binary: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, Go BuildID=kuiME-kEtOrjYr0NtuSC/F9nT4PAOBdJwNF6rCoCc/7l0D-CmOuZoubD_SqInN/JtxNTIAPCIxt045aNaaC, not stripped
I can see that it's a Go program and was compiled using musl
so I installed musl-cross-make and musl:arm64
, libc6-dev-arm64-cross
, and gcc-aarch64-linux-gnu
from apt
.
However, every time I try to run it, I get all these Error relocating: symbol not found
errors.
~$ unset LD_LIBRARY_PATH; LD_DEBUG=libs QEMU_STRACE=1 qemu-aarch64-static -L /usr/aarch64-linux-musl/ arm_binary
Error relocating /lib/aarch64-linux-musl/libgps.so: __fdelt_chk: symbol not found180208 writev(2,0x55007ff7a8,0x2) = 81
180208 writev(2,0x55007ff8a8,0x2) = 0
180208 writev(2,0x55007ff788,0x2) = 1
Error relocating /lib/aarch64-linux-musl/libgps.so: __fprintf_chk: symbol not found180208 writev(2,0x55007ff7a8,0x2) = 83
180208 writev(2,0x55007ff8a8,0x2) = 0
180208 writev(2,0x55007ff788,0x2) = 1
Error relocating /lib/aarch64-linux-musl/libgps.so: __snprintf_chk: symbol not found180208 writev(2,0x55007ff7a8,0x2) = 84
180208 writev(2,0x55007ff8a8,0x2) = 0
180208 writev(2,0x55007ff788,0x2) = 1
Error relocating /lib/aarch64-linux-musl/libgps.so: __syslog_chk: symbol not found180208 writev(2,0x55007ff7a8,0x2) = 82
180208 writev(2,0x55007ff8a8,0x2) = 0
There are many more errors but I've omitted them. I have libgps.so
and all the other files that the binary supposedly cannot relocate. Does anyone know what the issue might be?