Short version:
Installed Ubuntu Touch, and noticed that there's no /lib/ld-linux.so.3
dynamic linker (symlink or otherwise). First time I've seen this missing from a Linux installation. Is there any particular reason it isn't there?
Long version:
I just installed Ubuntu Touch (13.10, stable) on a first-gen Nexus 7, and I want to try some ARM-targeted compilation on it.
I installed the gcc-arm-linux-gnueabi
package on my Ubuntu desktop (12.04, incidentally) and compiled a simple "hello world" in C, then copied it over to the Nexus, ssh
'd in, and ran the executable (nexustest
). The response was:
-bash: ./nexustest: No such file or directory
Ultimately I found that this was because Ubuntu was failing to even load the ld-linux.so
dynamic linker. As per usual on a non-statically-linked Linux executable, ldd nexustest
shows that it's looking for /lib/ld-linux.so.3
, and the Ubuntu Touch installation doesn't have that.
I can "fix" this with either of the following, in which case the "hello world" runs as expected:
Copying or symlinking
/lib/ld-linux-armhf.so.3
to/lib/ld-linux.so.3
-- suggesting thatld-linux-armhf.so.3
is the right dynamic linkerCompiling (linking) the executable with
-static
-- suggesting thatarm-linux-gnueabi-gcc
is using the right linker/arch
From the GCC and Linux linking perspective, everything seems to be working as expected, except that there's no /lib/ld-linux.so.3
on my Nexus 7 (which I expect should just be a symlink to ld-linux-armhf.so.3
). Why is that? Is the omission a mistake, or some intentional distro-design decision that I'm just not getting?