summaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-11-30 07:29:05 +0000
committerDenis Vlasenko2007-11-30 07:29:05 +0000
commit6672c8e480994a3d9c928ddedd0542c9ed9b3271 (patch)
tree43fa46479002d6c7129c772adbf25d3b0cc8edde /libbb/lineedit.c
parentb539c8452f823a377bf629cf0e44ccda4a16c6c4 (diff)
downloadbusybox-6672c8e480994a3d9c928ddedd0542c9ed9b3271.zip
busybox-6672c8e480994a3d9c928ddedd0542c9ed9b3271.tar.gz
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
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 4d33834..07db635 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)