busybox/scripts
Ron Yorston 0b25e810ed bloat-o-meter: avoid double counting
Disable 'echo' in the default config, run 'make baseline', then
re-enable 'echo' and run 'make bloatcheck':

function                                             old     new   delta
.rodata                                           182521  182622    +101
packed_usage                                       33714   33792     +78
applet_main                                         3168    3176      +8
applet_names                                        2730    2735      +5
applet_suid                                           99     100      +1
applet_install_loc                                   198     199      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 194/0)             Total: 194 bytes
   text	   data	    bss	    dec	    hex	filename
 955052	   4195	   1808	 961055	  eaa1f	busybox_old
 955153	   4195	   1808	 961156	  eaa84	busybox_unstripped

The Total bytes value doesn't equal the change in the size of the
binary.  The packed_usage and applet_* items are in .rodata and
are counted twice.  With this modified bloat-o-meter the size of
named items is deducted from .rodata:

function                                             old     new   delta
packed_usage                                       33714   33792     +78
applet_main                                         3168    3176      +8
.rodata                                           105105  105113      +8
applet_names                                        2730    2735      +5
applet_suid                                           99     100      +1
applet_install_loc                                   198     199      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 101/0)             Total: 101 bytes
   text	   data	    bss	    dec	    hex	filename
 955052	   4195	   1808	 961055	  eaa1f	busybox_old
 955153	   4195	   1808	 961156	  eaa84	busybox_unstripped

v2: Sections numbered less than 10 were always being omitted from
    consideration because splitting "[ 1] .interp" leaves "1]" in
    x[1] where the section name is expected.  This wasn't a problem
    for .rodata (numbered 15 in my testing) but let's fix it anyway.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-03-09 17:25:07 +01:00
..
basic build system: fix compiler warnings 2019-01-06 20:12:16 +01:00
kconfig build system: fix compiler warnings 2019-01-06 20:12:16 +01:00
bb_release tar: add TODO about a bug with non-writable directories on extract 2021-01-01 13:34:25 +01:00
bloat-o-meter bloat-o-meter: avoid double counting 2021-03-09 17:25:07 +01:00
checkhelp.awk
checkstack.pl checkstack.pl: tweak bfin re 2019-01-18 09:56:19 +01:00
cleanup_printf2puts
echo.c scripts/echo.c: resolve implicit declaration of function 'dup2' 2019-03-05 16:57:04 +01:00
embedded_scripts hush: allow hush to run embedded scripts 2018-11-27 16:13:07 +01:00
find_bad_common_bufsiz
find_stray_common_vars
find_stray_empty_lines
fix_ws.sh
gcc-version.sh
gen_build_files.sh hush: allow hush to run embedded scripts 2018-11-27 16:13:07 +01:00
generate_BUFSIZ.sh build system: make CONFIG_FEATURE_USE_BSS_TAIL less funky 2016-06-29 15:00:52 +02:00
Kbuild.include build system: remove KBUILD_STR() 2020-04-29 14:52:19 +02:00
Kbuild.src
Makefile.build
Makefile.clean
Makefile.host
Makefile.IMA build system: remove KBUILD_STR() 2020-04-29 14:52:19 +02:00
Makefile.lib build system: remove KBUILD_STR() 2020-04-29 14:52:19 +02:00
memusage
mkconfigs
mkdiff_obj
mkdiff_obj_bloat
mkmakefile
objsizes
randomtest randomconfig fixes 2020-06-24 00:27:37 +02:00
randomtest.loop randomconfig fixes 2017-12-31 17:30:02 +01:00
sample_pmap
showasm
test_make_clean
test_make_O
test_setenv_leak.c crond: do not assume setenv() does not leak 2017-07-22 02:25:47 +02:00
trylink trylink: do not drop libs from CONFIG_EXTRA_LDLIBS 2021-02-23 23:09:49 +01:00