Sample Header Ad - 728x90

`aarch64-linux-musl-cross` has a broken link for `ld-musl-aarch64.so.1`

3 votes
1 answer
5268 views
# The goal I want to run an ARM64 Go binary on x86_64 Kali Linux using QEMU user mode. # The problem I got aarch64-linux-musl-cross.
~$ wget https://musl.cc/aarch64-linux-musl-cross.tgz 
~$ tar -xvf aarch64-linux-musl-cross.tgz
I then used ~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc to compile a simple hello world Go program. It compiled exactly as I wanted it to.
~/go_projects/bin$ file hello
hello: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, Go BuildID=-37pQ_4dEsp4pnAgj4QV/0unDR_0nE-A-DsF1SfKd/-8CRGAArG5J0XNspP2M-/u6ChmkaiRo9qoxEE15eo, not stripped
But, for some reason, the interpreter ~/aarch64-linux-musl-cross/aarch64-linux-musl/lib/ld-musl-aarch64.so.1 is a broken link to /lib/libc.so. I have a file /usr/aarch64-linux-gnu/lib/libc.so but it's just a text file.
~$ file /usr/aarch64-linux-gnu/lib/libc.so
/usr/aarch64-linux-gnu/lib/libc.so: ASCII text
~$ cat /usr/aarch64-linux-gnu/lib/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf64-littleaarch64)
GROUP ( /usr/aarch64-linux-gnu/lib/libc.so.6 /usr/aarch64-linux-gnu/lib/libc_nonshared.a  AS_NEEDED ( /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 ) )
What is the link ld-musl-aarch64.so.1 supposed to point to?
Asked by Revoltechs (135 rep)
Nov 18, 2020, 05:01 AM
Last activity: Jun 16, 2025, 09:06 PM