[Toybox] Where does the dynamic linker live in cross compile toolchains?
enh
enh at google.com
Mon Jul 20 18:51:00 UTC 2026
On Sun, Jul 19, 2026 at 5:57 PM Rob Landley via Toybox
<toybox at lists.landley.net> wrote:
>
> I'm trying to update mkroot/packages/dynamic and in theory I can
> ${CROSS_COMPILE}cc --print-file-name=libc.so and then copy all the
> shared libraries and symlinks out of that directory, but I don't know
> how to find and install the dynamic linker out of a compiler toolchain.
you can't, because it's not there.
> In musl-libc it's a symlink to libc.so so I can just do that, and I've
> got to admit I don't care about glibc that much, but I can't find the
> dynamic linker binary anywhere under the Android NDK?
>
> Bionic's libc.so is executable so maybe it pulls the same trick, but I
> have yet to find a way to invoke it that isn't an immediate segfault
> so... dunno?
no, /system/bin/linker (for ilp32) or /system/bin/linker64 on the
device are the dynamic linker for that device's version of the os.
> In musl, running it gives a --version dump:
>
> $ x86_64-linux-musl/lib/libc.so
> musl libc (x86_64)
> Version 1.2.5
> Dynamic Program Loader
> Usage: x86_64-linux-musl/lib/libc.so [options] [--] pathname [args]
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> https://lists.landley.net/mailman/listinfo/toybox
More information about the Toybox
mailing list