From 6672c8e480994a3d9c928ddedd0542c9ed9b3271 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 30 Nov 2007 07:29:05 +0000 Subject: test: stop using lots of bss. function old new delta test_main 425 456 +31 t_lex 69 73 +4 syntax 100 104 +4 ptr_to_statics 8 12 +4 t_wp_op 4 - -4 t_wp 4 - -4 ngroups 4 - -4 group_array 4 - -4 binop 590 585 -5 oexpr 104 97 -7 aexpr 101 94 -7 nexpr 831 820 -11 leaving 156 - -156 ------------------------------------------------------------------------------ (add/remove: 0/5 grow/shrink: 4/4 up/down: 43/-202) Total: -159 bytes text data bss dec hex filename 775098 929 9084 785111 bfad7 busybox_old 775107 933 8908 784948 bfa34 busybox_unstripped --- libbb/lineedit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4d33834ce..07db6358d 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -121,6 +121,8 @@ struct statics { #endif }; +/* Make it reside in writable memory, yet make compiler understand + * that it is not going to change. */ static struct statics *const ptr_to_statics __attribute__ ((section (".data"))); #define S (*ptr_to_statics) -- cgit v1.2.3