mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
4287c85589
The scheme is very similar to libsystemd-shared.so: instead of building a static library, we build a shared library from the same objects and link the two users to it. Both systemd and systemd-analyze consist mostly of the fairly big code in libcore, so we save a bit on the installation: (-0g, no strip) -rwxr-xr-x 5238864 Dec 14 12:52 /var/tmp/inst1/usr/lib/systemd/systemd -rwxr-xr-x 5399600 Dec 14 12:52 /var/tmp/inst1/usr/bin/systemd-analyze -rwxr-xr-x 244912 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/systemd -rwxr-xr-x 461224 Dec 14 13:17 /var/tmp/inst2/usr/bin/systemd-analyze -rwxr-xr-x 5271568 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so (-0g, strip) -rwxr-xr-x 2522080 Dec 14 13:19 /var/tmp/inst1/usr/lib/systemd/systemd -rwxr-xr-x 2604160 Dec 14 13:19 /var/tmp/inst1/usr/bin/systemd-analyze -rwxr-xr-x 113304 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/systemd -rwxr-xr-x 207656 Dec 14 13:19 /var/tmp/inst2/usr/bin/systemd-analyze -rwxr-xr-x 2648520 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so So for systemd itself we grow a bit (2522080 → 2648520+113304=2761824), but overall we save. The most is saved on all the test files that link to libcore, if they are installed, because there's 15 of them: $ du -s /var/tmp/inst? 220096 /var/tmp/inst1 122960 /var/tmp/inst2 I also considered making systemd-analyze a symlink to /usr/lib/systemd/systemd and turning systemd into a multicall binary. We did something like this with udevd and udevadm. But that solution doesn't fit well in this case. systemd-analyze has a bunch of functionality that is not used in systemd, so the systemd binary would need to grow quite a bit. And we're likely to add new types of verification or introspection features in analyze, and this baggage would only grow. In addition, there are the test binaries which also benefit from this. |
||
---|---|---|
.. | ||
chromiumos | ||
add-git-hook.sh | ||
analyze-dump-sort.py | ||
catalog-report.py | ||
check-api-docs.sh | ||
check-compilation.sh | ||
check-directives.sh | ||
check-help.sh | ||
check-includes.pl | ||
choose-default-locale.sh | ||
coverity.sh | ||
dbus_exporter.py | ||
find-build-dir.sh | ||
find-double-newline.sh | ||
find-tabs.sh | ||
gdb-sd_dump_hashmaps.py | ||
generate-gperfs.py | ||
get-coverity.sh | ||
git-contrib.sh | ||
list-discoverable-partitions.py | ||
make-autosuspend-rules.py | ||
make-directive-index.py | ||
make-man-index.py | ||
meson-build.sh | ||
meson-make-symlink.sh | ||
meson-render-jinja2.py | ||
meson-vcs-tag.sh | ||
oss-fuzz.sh | ||
update-dbus-docs.py | ||
update-hwdb-autosuspend.sh | ||
update-hwdb.sh | ||
update-man-rules.py | ||
update-syscall-tables.sh | ||
xml_helper.py |