Age | Commit message (Collapse) | Author |
|
If this breaks things, please document why!
mdev,init: use shared code for fd sanitization
function old new delta
bb_daemonize_or_rexec 155 172 +17
mdev_main 500 505 +5
init_main 907 856 -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 22/-51) Total: -29 bytes
|
|
|
|
- use ut_tv.tv_sec rather than ut_time (me)
- shrink halt a little bit (me):
halt_main 464 433 -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31) Total: -31 bytes
|
|
|
|
|
|
|
|
just build relevant source and use xxx_main functions.
build system: add a special case when we have exactly one applet enabled
(makes "true", "false", "basename" REALLY tiny).
getopt32: do not use stdio.
function old new delta
getopt32 1385 1412 +27
make_device 1187 1200 +13
basename_main 120 127 +7
tcpudpsvd_main 1922 1926 +4
testcmd 5 - -5
echocmd 5 - -5
fuser_main 1243 1231 -12
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/1 up/down: 51/-22) Total: 29 bytes
|
|
|
|
Good choices are "do it, always" or "don't do it". Second is smaller.
|
|
|
|
*/Config.in: fixes to text
svlogd: make it NOMMU capable
function old new delta
processorstart 378 420 +42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 42/0) Total: 42 bytes
text data bss dec hex filename
797153 662 7420 805235 c4973 busybox_old
797196 662 7420 805278 c499e busybox_unstripped
|
|
function old new delta
getopt32 1370 1385 +15
sulogin_main 490 494 +4
realpath_main 84 86 +2
sleep_main 76 77 +1
mt_main 256 257 +1
printenv_main 75 74 -1
fdformat_main 546 545 -1
usleep_main 44 42 -2
setlogcons_main 77 75 -2
ed_main 2654 2649 -5
deallocvt_main 69 64 -5
addgroup_main 373 368 -5
mkfs_minix_main 2989 2982 -7
tail_main 1221 1213 -8
sv_main 1254 1241 -13
du_main 348 328 -20
tftp_main 325 302 -23
split_main 581 558 -23
nc_main 1000 977 -23
diff_main 891 868 -23
arping_main 1797 1770 -27
ls_main 893 847 -46
od_main 2797 2750 -47
readprofile_main 1944 1895 -49
tcpudpsvd_main 1973 1922 -51
udhcpc_main 2590 2513 -77
grep_main 824 722 -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/22 up/down: 23/-560) Total: -537 bytes
text data bss dec hex filename
796973 658 7428 805059 c48c3 busybox_old
796479 662 7420 804561 c46d1 busybox_unstripped
|
|
function old new delta
bbunpack 358 366 +8
passwd_main 1070 1072 +2
handle_incoming_and_exit 2651 2653 +2
getpty 88 86 -2
script_main 975 972 -3
inetd_main 2036 2033 -3
dname_enc 377 373 -4
make_new_session 474 462 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24) Total: -12 bytes
text data bss dec hex filename
797429 658 7428 805515 c4a8b busybox_old
797417 658 7428 805503 c4a7f busybox_unstripped
|
|
libbb: rename sig_pause to wait_for_any_sig.
|
|
httpd: trivial compile fix
|
|
|
|
we use it for config reload, and we have QUIT for "restart".
|
|
::restart:/sbin/rc restart
resulted in:
exec of '/sbin/rc restart' failed: No such file or directory
|
|
which sets same handler for many signals. sig_catch is nuked
(bb_signals_recursive is more descriptive name).
*: use them as appropriate.
function old new delta
bb_signals_recursive - 95 +95
bb_signals - 52 +52
run_command 258 273 +15
svlogd_main 1368 1377 +9
runsv_main 1746 1752 +6
runsvdir_main 1643 1646 +3
UNSPEC_print 64 66 +2
time_main 1128 1127 -1
...
resize_main 246 210 -36
sig_catch 63 - -63
set_fatal_sighandler 85 14 -71
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548) Total: -366 bytes
|
|
|
|
|
|
|
|
|
|
for sysinit-like processes (Harald Küthe <harald-tuxbox@arcor.de>)
|
|
*: use more approproate (shorter) versions of wait()
function old new delta
safe_waitpid - 48 +48
wait_any_nohang - 17 +17
send_tree 365 369 +4
processorstop 432 435 +3
text_yank 110 108 -2
make_human_readable_str 202 200 -2
crond_main 1368 1366 -2
handle_sigchld 49 43 -6
reapchild 166 159 -7
custom 260 250 -10
checkscript 191 177 -14
wait_nohang 17 - -17
wait_pid 43 - -43
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103) Total: -31 bytes
|
|
init: shrink signal disabling code
init: rename some functions
text data bss dec hex filename
778657 832 7344 786833 c0191 busybox_old
778445 832 7344 786621 c00bd busybox_unstripped
|
|
|
|
|
|
init: slight size optimization
|
|
init: remove pointless access() check
|
|
cttyhack: add stealing of ctty
|
|
init: remove obsolete comment
|
|
|
|
readahead: stop using stdio.h
*: style fixes
|
|
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
|
|
263 bytes saved.
|
|
|
|
(one which strips trailing slash and one which does not)
wget: straighten out as a result of above change
text data bss dec hex filename
5056 1 0 5057 13c1 busybox.t4/networking/wget.o
5022 0 0 5022 139e busybox.t5/networking/wget.o
|
|
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
|
|
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
|
|
init_main 929 920 -9
bb_daemonize_or_rexec 145 127 -18
|
|
correct_password: explain in detail why it is ok to use bb_banner
fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one
Marginal size difference:
text data bss dec hex filename
679119 2700 15632 697451 aa46b busybox_old
679091 2700 15632 697423 aa44f busybox_unstripped
|
|
function old new delta
bb_PATH_root_path - 35 +35
varunset 60 58 -2
arith 2042 2033 -9
bb_default_root_login_path 30 - -30
.rodata 128794 128762 -32
which_main 152 117 -35
defpathvar 40 - -40
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/4 up/down: 35/-148) Total: -113 bytes
|
|
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
|
|
|
|
|
|
|
|
|