mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 04:40:04 +01:00
- this allows the linker to drop unused symbols via link-time optimization
or with --gc-sections:
git clean -fdx
./autogen.sh --enable-ld-gc --enable-ifcfg-rh --enable-ifupdown \
--enable-ifnet --enable-ibft --enable-teamdctl --enable-wifi \
--with-modem-manager-1 --with-ofono --with-more-asserts \
--with-more-logging
make -j20
strip ./src/NetworkManager
gives 2822840 vs. 2625960 bytes (-7%).
- this also gives more control over the symbols that are used by the
plugins. Yes, it means if you modify a plugin to use a new symbols,
you have to extend NetworkManager.ver file.
You can run the script to create the version file:
$ ./tools/create-exports-NetworkManager.sh update
but be sure that your current configuration enables all plugins
and debugging options to actually use all symbols that are in use.
- If you compile with certain plugins enabled, you could theoretically
re-compile NetworkManager to expose less symbols. Try:
$ ./tools/create-exports-NetworkManager.sh build
- note that we have `make check` tests to ensure that all used
symbols of the plugins can be found. So, it should not be possible
to accidentally forget to expose a symbol.
|
||
|---|---|---|
| .. | ||
| check-exports.sh | ||
| create-exports-NetworkManager.sh | ||
| debug-helper.py | ||
| enums-to-docbook.pl | ||
| Makefile.am | ||
| run-test-dbus-session.sh | ||
| run-test-valgrind.sh | ||
| test-networkmanager-service.py | ||
| test-sudo-wrapper.sh | ||