On Tue, Jun 11, 2013 at 5:18 AM, Cristian Rodríguez <crrodrig...@opensuse.org> wrote: > El 10/06/13 15:25, Kay Sievers escribió: > >> On Mon, Jun 10, 2013 at 7:26 PM, Cristian Rodríguez >> <crrodrig...@opensuse.org> wrote: >>> >>> El 10/06/13 06:17, Lennart Poettering escribió: >> >> >>>> Hmm, you list that our daemons would require pcre? That's weird, we >>>> don't really do that. That sounds like a bug, >> >> >>> Sounds more like something in the dependency chain is not linked with >>> as-needed causing a mess. >> >> >> Seems selinux does add that dependency, and which cannot be eliminated >> with as-needed as soon as any selinux things are used: >> >> $ echo 'int main(int argc, char *argv[]) { return 0; }' > main.c; >> gcc main.c -o main -lselinux; ldd main >> linux-vdso.so.1 => (0x00007ffff33fe000) >> libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fd2232b1000) >> libc.so.6 => /lib64/libc.so.6 (0x00007fd222ef1000) >> libdl.so.2 => /lib64/libdl.so.2 (0x00007fd222cec000) >> libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fd222a88000) >> libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd22286c000) >> /lib64/ld-linux-x86-64.so.2 (0x00007fd2234ef000) >> >> Kay > > > hrmmm.. > > > echo 'int main(int argc, char *argv[]) { return 0; }' > main.c; > gcc -Wl,--as-needed main.c -o main -lselinux; ldd main > linux-vdso.so.1 (0x00007fff3f9fe000) > libc.so.6 => /lib64/libc.so.6 (0x00007f6b3364a000) > /lib64/ld-linux-x86-64.so.2 (0x00007f6b339f7000) > > no linkage with selinux, as expected since our little main.c does not use > selinux.
That's right, it does not pull-in selinux and as-needed can still get rid of it. But as soon as selinux is needed, pcre is also pulled-in into the main binary by this: $ nm -D /usr/lib64/libselinux.so.1 | grep pcre U pcre_compile U pcre_exec U pcre_free U pcre_free_study U pcre_study Kay _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel