aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-16 17:45:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-16 17:45:32 +0200
commite440b39416e7876129e619f7aa6935c783020645 (patch)
tree1507256a61302443f642c3b517a323671441cae8 /editors
parentcf686ae3b401c68b64ff997b68b7972881dbf80e (diff)
downloadbusybox-e440b39416e7876129e619f7aa6935c783020645.tar.gz
*: stop using atexit in non-debug build: saves ~260 in bss with musl
"builtin" below is atexit's 32-element global array of functions to call. function old new delta top_main 879 889 +10 launch_helper 185 193 +8 powertop_main 1555 1559 +4 sed_main 651 650 -1 slot 4 - -4 call 4 - -4 atexit 23 - -23 kill_helper 31 - -31 __funcs_on_exit 120 - -120 __cxa_atexit 168 - -168 builtin 260 - -260 ------------------------------------------------------------------------------ (add/remove: 0/8 grow/shrink: 3/1 up/down: 22/-611) Total: -589 bytes text data bss dec hex filename 912364 563 6132 919059 e0613 busybox_old 912035 563 5844 918442 e03aa busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index f68f44724..3fc40ceef 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1521,7 +1521,7 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
//argc -= optind;
argv += optind;
if (opt & OPT_in_place) { // -i
- atexit(cleanup_outname);
+ die_func = cleanup_outname;
}
if (opt & (2|4))
G.regex_type |= REG_EXTENDED; // -r or -E