[systemd-devel] Excessive linking of systemd-timestamp

Lennart Poettering lennart at poettering.net
Tue Nov 1 16:06:27 PDT 2011


On Thu, 13.10.11 20:08, Daniel Drake (dsd at laptop.org) wrote:

> Hi,
> 
> Running systemd-36 on Fedora 16.
> 
> $ ldd /lib/systemd/systemd-timestamp
> 	linux-gate.so.1 =>  (0x00a84000)
> 	libselinux.so.1 => /lib/libselinux.so.1 (0x0059c000)
> 	libcap.so.2 => /lib/libcap.so.2 (0x00901000)
> 	librt.so.1 => /lib/librt.so.1 (0x00a6a000)
> 	libc.so.6 => /lib/libc.so.6 (0x00110000)
> 	/lib/ld-linux.so.2 (0x009c1000)
> 	libdl.so.2 => /lib/libdl.so.2 (0x00f09000)
> 	libattr.so.1 => /lib/libattr.so.1 (0x00f23000)
> 	libpthread.so.0 => /lib/libpthread.so.0 (0x007be000)
> 
> 
> The excessive linking of this tiny application is challenging my
> efforts to keep our initramfs slim for our embedded setup. dracut
> includes this app in the initramfs by default, and to satisfy its
> requirements it results in all those libraries getting added too.
> 
> Could this be reduced? I guess all it needs is libc.

Yes, definitely. Harald prepared a patch to work in this direction, but
I guess we could go even further.

linux-gate.so.1, librt.so.1, libc.so.6, /lib/ld-linux.so.2,
libpthread.so.0 are probably nothing we can get rid of. 

libdl.so.2, libattr.so.1, libcap.so.2, libselinux.so.1 OTOH are
definitely something we should be able to make dependencies only of the
tools which actually need them.

I'd be happy to take a patch for that ;-)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list