Age | Commit message (Collapse) | Author |
|
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
|
|
verbose 12 13 +1
open_next_file 102 99 -3
limit_bytes_to_format 4 1 -3
ioerror 4 1 -3
flag_pseudo_start 4 1 -3
flag_dump_strings 4 1 -3
abbreviate_duplicate_blocks 4 - -4
check_and_close 96 90 -6
od_main 2988 2955 -33
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/7 up/down: 1/-58) Total: -57 bytes
text data bss dec hex filename
781314 1328 11876 794518 c1f96 busybox_old
781266 1328 11844 794438 c1f46 busybox_unstripped
|
|
|
|
rand48 machinery:
zcip_main 1552 1537 -15
seed48 22 - -22
__libc_drand48_data 24 - -24
seed48_r 78 - -78
__GI_seed48_r 78 - -78
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/1 up/down: 0/-217) Total: -217 bytes
|
|
|
|
|
|
stack is infinite. Unfortunately, +79 bytes.
|
|
function old new delta
tar_longopts - 222 +222
static.udhcpc_longopts - 192 +192
start_stop_daemon_longopts - 150 +150
getopt32 1045 1185 +140
static.wget_longopts - 111 +111
static.od_longopts - 105 +105
getopt_longopts - 96 +96
install_longopts - 67 +67
ipcalc_longopts - 63 +63
static.hwclock_longopts - 54 +54
ftpgetput_longopts - 52 +52
static.dumpleases_longopts - 32 +32
env_longopts - 31 +31
runparts_longopts - 30 +30
mv_longopts - 24 +24
mkdir_longopts - 19 +19
find_pair 164 180 +16
bb_null_long_options - 16 +16
setconsole_longopts - 10 +10
display_speed 91 98 +7
collect_blk 467 474 +7
show_color 4 1 -3
ls_main 913 904 -9
bb_default_long_options 16 - -16
ls_color_opt 32 10 -22
setconsole_long_options 32 - -32
arith 2077 2030 -47
mv_long_options 48 - -48
mkdir_long_options 48 - -48
env_long_options 48 - -48
static.options 248 184 -64
runparts_long_options 80 - -80
ftpgetput_long_options 96 - -96
static.hwclock_long_options 112 - -112
install_long_options 112 - -112
static.long_options 144 - -144
static.wget_long_options 160 - -160
longopts 160 - -160
static.arg_options 304 - -304
tar_long_options 320 - -320
long_options 384 - -384
------------------------------------------------------------------------------
(add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209) Total: -765 bytes
text data bss dec hex filename
782618 1328 11900 795846 c24c6 busybox_old
781354 1328 11900 794582 c1fd6 busybox_unstripped
|
|
|
|
<ynakam@hitachisoft.jp>
|
|
|
|
|
|
|
|
|
|
|
|
find_pair 164 180 +16
passwd_main 1222 1230 +8
display_speed 91 96 +5
msh_main 1335 1339 +4
qrealloc 38 36 -2
refresh 1190 1182 -8
cut_main 543 532 -11
sendCgi 1807 1794 -13
getopt32 1063 1045 -18
arith 2077 2030 -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes
text data bss dec hex filename
781548 1168 11900 794616 c1ff8 busybox_old
781452 1168 11900 794520 c1f98 busybox_unstripped
|
|
update_passwd 732 734 +2
chpasswd_main 318 292 -26
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-26) Total: -24 bytes
text data bss dec hex filename
781564 1168 11900 794632 c2008 busybox_old
781548 1168 11900 794616 c1ff8 busybox_unstripped
|
|
|
|
|
|
|
|
|
|
|
|
text data bss dec hex filename
772572 1168 22680 796420 c2704 busybox_old
772444 1168 22680 796292 c2684 busybox_unstripped
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* the puzzling message on error is replaced with strerror(errno)
so it should be even more detailed and smaller at the same time.
* merged code in edit_file() and code for ':edit <file>' in colon() into
new func init_text_buffer(). Was horribly duplicate. Moved most of
error/sanity checking to file_insert(). Result is that you get a proper
validation (prevent reading /dev/*) and error messages for ':r <file>'
* renamed 'cfn' to 'current_filename' for improved readability
* merged smallint vi_readonly and readonly into bitfields into
readonly_mode to save space.
* added text_size variable to keep track how big the text buffer is.
This is used to fix a buffer overflow. To reproduce bug:
./busybox vi TODO
:r Makefile
vi segfaults due to no buffer checking is done at all. som redesign is
needed here but i added a check in text_hole_make() to aviod the
segfault at least.
* removed isblnk() and use isblank(3) instead.
* fixed compiler warning by displaying the return code for :!<command>
This makes things bigger than needed but since the patch reduces the
overall size... (see below)
* new func next_tabstop(int) merges some duplicate code. There are more
cuplicode here but i couldnt find a good way to merge them.
* Fix *ANNOYING* placement of cursor on '\t' characters. To reproduce:
echo -e "\thello" > file1
./busybox vi file1
Try to insert some text at the beginning of line. Text will be inserted
but cursor is blinking somewhere else. The patch should make busybox vi
behave more like original vi(m). Costs a few bytes but its worth it
imho.
* new_text() is moved into init_text_buffer()
* the previously added update_ro_status() was moved info file_insert due
to duplication removal mentioned above.
function old new delta
init_text_buffer - 245 +245
file_insert 312 420 +108
next_tabstop - 82 +82
text_hole_make 154 171 +17
do_cmd 5093 5100 +7
static.cmd_mode_indicator - 5 +5
refresh 1248 1253 +5
current_filename - 4 +4
yank_delete 161 164 +3
what_reg 96 99 +3
end_cmd_q 78 81 +3
char_insert 440 442 +2
readonly_mode - 1 +1
vi_readonly 1 - -1
setops 154 153 -1
readonly 1 - -1
vi_setops 4 1 -3
string_insert 161 158 -3
cfn 4 - -4
show_status_line 532 514 -18
readit 519 500 -19
move_to_col 161 138 -23
vi_main 495 433 -62
isblnk 75 - -75
.rodata 4751 4655 -96
edit_file 892 787 -105
new_text 125 - -125
update_ro_status 131 - -131
colon 3848 3667 -181
------------------------------------------------------------------------------
(add/remove: 5/6 grow/shrink: 8/10 up/down: 485/-848) Total: -363
bytes
text data bss dec hex filename
34751 873 4260 39884 9bcc busybox_old
34439 877 4260 39576 9a98 busybox_unstripped
|
|
|
|
|
|
specified libs, and if it succeeds, we try to remove them
one-by-one. If link succeeds, then library is thrown out.
Should solve the problem with SELinux linking in libsepol
even when not needed.
|
|
<dmarsh@bigw.com.au>
|
|
(not everyone likes them - but code does get smaller).
display_generic - 761 +761
static.fmt_100percent_8 - 111 +111
fmt_100percent_8 101 - -101
display_status 1489 581 -908
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/1 up/down: 872/-1009) Total: -137 bytes
text data bss dec hex filename
677020 3344 13936 694300 a981c busybox_old
676876 3344 13936 694156 a978c busybox_unstripped
|
|
fmt_100percent_8 - 101 +101
.rodata 129185 129153 -32
display_status 1726 1489 -237
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 101/-269) Total: -168 bytes
text data bss dec hex filename
677180 3344 13936 694460 a98bc busybox_old
677020 3344 13936 694300 a981c busybox_unstripped
|
|
display_status 1787 1726 -61
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-61) Total: -61 bytes
text data bss dec hex filename
677244 3344 13936 694524 a98fc busybox_old
677180 3344 13936 694460 a98bc busybox_unstripped
|
|
|
|
grep_file 771 822 +51
packed_usage 22573 22610 +37
.rodata 128058 128090 +32
grep_main 842 853 +11
max_matches - 4 +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 135/0) Total: 135 bytes
|
|
print_line 152 170 +18
did_print_line - 1 +1
grep_file 788 771 -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 19/-17) Total: 2 bytes
text data bss dec hex filename
673368 2740 13968 690076 a879c busybox_old
673368 2740 13968 690076 a879c busybox_unstripped
|
|
|
|
Spotted by Natanael Copa <natanael.copa@gmail.com>
|
|
require rood to use w! when saving non-writable files.
Patch by Natanael Copa <natanael.copa@gmail.com>
update_ro_status - 73 +73
edit_file 819 822 +3
colon 3440 3425 -15
.rodata 128090 128058 -32
file_insert 288 235 -53
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 76/-100) Total: -24 bytes
text data bss dec hex filename
673344 2740 13968 690052 a8784 busybox_old
673320 2740 13968 690028 a876c busybox_unstripped
|
|
function old new delta
do_iptunnel 203 977 +774
process_dev 5328 5494 +166
ioctl_or_perror - 54 +54
ioctl_or_perror_and_die - 51 +51
ioctl_alt_func - 49 +49
bb_ioctl_or_warn - 47 +47
do_add_ioctl 102 145 +43
bb_xioctl - 39 +39
print_value_on_off - 31 +31
get_lcm 105 123 +18
arp_main 2155 2167 +12
..................
zcip_main 1576 1566 -10
setlogcons_main 92 82 -10
dumpkmap_main 263 253 -10
do_get_ioctl 85 75 -10
setkeycodes_main 165 154 -11
write_table 244 232 -12
vconfig_main 318 306 -12
do_del_ioctl 93 81 -12
set_address 75 62 -13
maybe_set_utc 30 16 -14
loadfont_main 495 479 -16
slattach_main 712 695 -17
do_loadfont 191 174 -17
do_iplink 1155 1136 -19
getty_main 2583 2562 -21
fbset_main 2058 2035 -23
do_time 588 565 -23
xioctl 25 - -25
read_rtc 186 160 -26
parse_conf 1299 1270 -29
udhcp_read_interface 269 239 -30
bb_ioctl 45 - -45
bb_ioctl_alt 70 - -70
bb_ioctl_on_off 78 - -78
.rodata 129370 129018 -352
do_show 799 - -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864) Total: -548 bytes
text data bss dec hex filename
675352 2740 13968 692060 a8f5c busybox_old
674804 2740 13968 691512 a8d38 busybox_unstripped
|
|
function old new delta
makejob 263 270 +7
setjobctl 328 332 +4
jobscmd 96 94 -2
stoppedjobs 53 50 -3
jobctl 4 1 -3
job_warning 4 1 -3
forkshell 644 641 -3
cmdloop 422 409 -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/6 up/down: 11/-27) Total: -16 bytes
text data bss dec hex filename
675392 2740 13968 692100 a8f84 busybox_old
675380 2740 13968 692088 a8f78 busybox_unstripped
|
|
|
|
|
|
|