busybox/archival
Kang-Che Sung d5e7ff0292 bunzip2: fix code bloat caused by zcat's seamless magic
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>
2017-01-08 14:31:06 +01:00
..
libarchive randomconfig fixes 2016-12-08 12:24:48 +01:00
ar.c tweak defconfig 2015-10-25 20:36:03 +01:00
bbunzip_test2.sh
bbunzip_test3.sh
bbunzip_test.sh
bbunzip.c bunzip2: fix code bloat caused by zcat's seamless magic 2017-01-08 14:31:06 +01:00
bzip2.c Rename transformer_aux_data_t -> transformer_state_t 2014-12-07 00:42:49 +01:00
Config.src Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectable 2016-11-16 15:45:05 +01:00
cpio.c cpio: tweak help text 2016-07-08 12:52:24 +02:00
dpkg_deb.c Make DPKG=y and DPKG_DEB=y by default 2016-12-23 13:52:53 +01:00
dpkg.c Make DPKG=y and DPKG_DEB=y by default 2016-12-23 13:52:53 +01:00
gzip.c gzip: fix compression level bug. Closes 9131 2016-08-15 01:26:28 +02:00
Kbuild.src cpio: implement -R/--owner 2015-10-16 17:24:46 +02:00
lzop.c Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectable 2016-11-16 15:45:05 +01:00
rpm2cpio.c zcat: complain if input is not compressed 2014-02-02 02:06:38 +01:00
rpm.c *: add most of the required setup_common_bufsiz() calls 2016-04-21 18:18:48 +02:00
rpm.h *: make GNU licensing statement forms more regular 2010-08-16 20:14:46 +02:00
tar.c getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LIST 2016-07-06 21:58:02 +02:00
unzip.c unzip: do not use CDF.extra_len, read local file header. Closes 9536 2017-01-08 14:14:19 +01:00