[Talk] State of dynamic linking in various platforms...

Andrae Muys amuys at contal.net.au
Thu Aug 22 14:47:28 EST 2002


Luke Mewburn wrote:
> Hi.
> 
> I'm trying to determine the prevelance of dynamic linking in various
> recent UNIX operating systems.
>
<SNIP>
> 	Linux
> 		Dynamic linked "world" against /lib and /usr/lib ???

Linux is a dynamically linked "world" with a few exceptions.  The dynamic 
linker lives as /lib/ld-linux.so.* -> /lib/ld-*.*.*.so.  Executables are 
linked against the contents of /etc/ld.so.cache generated by /sbin/ldconfig 
from /etc/ld.so.conf. (IIRC)

A stat foreach in /bin gives:  [on a local RH7.2 development server]

/bin/ash.static: ELF 32-bit LSB executable, Intel 80386, version 1, 
statically linked, stripped
/bin/rpm: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped

Similarly for /usr/bin:

/usr/bin/db_dump185: ELF 32-bit LSB executable, Intel 80386, version 1, 
statically linked, stripped
/usr/bin/elksemu: Linux/i386 impure executable (OMAGIC), stripped
/usr/bin/statserial: ELF 32-bit LSB executable, Intel 80386, version 1, 
statically linked, stripped
/usr/bin/mh:: can't stat `/usr/bin/mh:' (No such file or directory).
db_dump185: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
elksemu: Linux/i386 impure executable (OMAGIC), stripped
statserial: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped

Similarly for /sbin:

dhcpcd: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
e2fsck: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
fsck.ext2: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
fsck.ext3: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
insmod.static: ELF 32-bit LSB executable, Intel 80386, version 1, 
statically linked, stripped
ldconfig: ELF 32-bit LSB executable, Intel 80386, version 1, statically 
linked, stripped
nash: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, 
stripped
sln: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, 
stripped

And for /usr/sbin:

glibc_post_upgrade: ELF 32-bit LSB executable, Intel 80386, version 1, 
statically linked, stripped

And no I have absolutely no idea what that last one is either ;).

Andrae Muys




More information about the Talk mailing list