[systemd-devel] [PATCH] Makefile.am: reduce linked libraries
Gustavo Sverzut Barbieri
barbieri at profusion.mobi
Wed Apr 4 12:59:02 PDT 2012
On Wed, Apr 4, 2012 at 4:52 PM, Kay Sievers <kay at vrfy.org> wrote:
> On Wed, Apr 4, 2012 at 18:53, Daniel Drake <dsd at laptop.org> wrote:
>> On Wed, Apr 4, 2012 at 10:36 AM, Daniel Drake <dsd at laptop.org> wrote:
>>> But with selinux included, the task is more complicated. For example,
>>> label.c (part of libsystemd-basic) also uses libselinux, so we need to
>>> move it out somewhere else (lets say we put it in a new library:
>>> libsystemd-extra). But the label_ functions are used several places
>>> inside util.c itself. Things are tangled. If I were to go down this
>>> path further I think we'd end up moving a huge amount of stuff to
>> I just realised that udevd links against libselinux, so even if we fix
>> selinux-timestamp I still won't be winning on that front - and I don't
>> see an easy way to keep udevd out of a dracut initramfs.
>> However, dropping the link against libcap (which also includes
>> libattr) would be nice. Here is a patch to do that.
>> Now that udev is included in systemd I will use this opportunity to
>> moan a little about the next dependency lover that gets included in
>> the initramfs: udevadm.
>> linux-gate.so.1 => (0xb771f000)
>> libselinux.so.1 => /lib/libselinux.so.1 (0xb76b9000)
>> libblkid.so.1 => /lib/libblkid.so.1 (0xb768f000)
>> libkmod.so.2 => /lib/libkmod.so.2 (0xb7677000)
>> librt.so.1 => /lib/librt.so.1 (0xb766e000)
>> libc.so.6 => /lib/libc.so.6 (0xb74be000)
>> libdl.so.2 => /lib/libdl.so.2 (0xb74b9000)
>> /lib/ld-linux.so.2 (0x4610a000)
>> libuuid.so.1 => /lib/libuuid.so.1 (0xb74b3000)
>> liblzma.so.5 => /lib/liblzma.so.5 (0xb748a000)
>> libz.so.1 => /lib/libz.so.1 (0xb7474000)
>> libpthread.so.0 => /lib/libpthread.so.0 (0xb7459000)
>> Don't suppose there is any obvious reduction possible here?
> It should be possible: selinux, lzma, z should not be needed. I think
> they just appeared in the systemd tree, and did not in the udev tree.
> There will be a lot of turnaround in the systemd tree then next weeks
> and udev will see some changes, so the current state just reflects a:
> "it builds after the merge" nothing else really.
Oh, then I guessed right :-)
As for the linkage review, yeah it would help.
> Blkid, uuid, kmod are linked because of the udevadm test-builtin
> command. We could change that one way or the other if it really solves
> a problem, which it might not.
Likely these are needed in initramfs as well as they may be used to
load required module and detect the root partition.
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
MSN: barbieri at gmail.com
Mobile: +55 (19) 9225-2202
More information about the systemd-devel