d5e7ff0292
This example single-applet configuration would trigger the bloat: CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y CONFIG_BUNZIP2=y # CONFIG_ZCAT is not set # All other applets disabled Here, the resulting "busybox-bunzip2" binary would contain unpack_gz_stream, unpack_lzma_stream and unpack_xz_stream functions code. In other words, the gzip, lzma and xz decompressors' code are linked into the binary unnecessarily. This happens because SEAMLESS_MAGIC != 0 and compiler is unable to figure out that SEAMLESS_MAGIC bit is never set. Fix this by disabling SEAMLESS_MAGIC option flag (setting its value to 0) when zcat is disabled. This will help the compiler optimize out bbunpack() and no longer generate open_zipped() function call. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
||
---|---|---|
.. | ||
libarchive | ||
ar.c | ||
bbunzip_test2.sh | ||
bbunzip_test3.sh | ||
bbunzip_test.sh | ||
bbunzip.c | ||
bzip2.c | ||
Config.src | ||
cpio.c | ||
dpkg_deb.c | ||
dpkg.c | ||
gzip.c | ||
Kbuild.src | ||
lzop.c | ||
rpm2cpio.c | ||
rpm.c | ||
rpm.h | ||
tar.c | ||
unzip.c |