aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-19 16:04:11 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-19 16:04:11 +0000
commit773f8e2060084657c29e674d859b572a60f1dbc9 (patch)
tree659c174c2656c573b167bfd0f314caf4c18101f0
parentc444f8ca0137c15eb3fd043e7e6022b169adcab7 (diff)
downloadbusybox-w32-773f8e2060084657c29e674d859b572a60f1dbc9.tar.gz
busybox-w32-773f8e2060084657c29e674d859b572a60f1dbc9.tar.bz2
busybox-w32-773f8e2060084657c29e674d859b572a60f1dbc9.zip
expand documentation
git-svn-id: svn://busybox.net/trunk/busybox@18165 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--docs/keep_data_small.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/keep_data_small.txt b/docs/keep_data_small.txt
index 66f92b321..fcd8df4a9 100644
--- a/docs/keep_data_small.txt
+++ b/docs/keep_data_small.txt
@@ -125,3 +125,32 @@ less readable, use #defines:
125If applet doesn't use much of global data, converting it to use 125If applet doesn't use much of global data, converting it to use
126one of above methods is not worth the resulting code obfuscation. 126one of above methods is not worth the resulting code obfuscation.
127If you have less than ~300 bytes of global data - don't bother. 127If you have less than ~300 bytes of global data - don't bother.
128
129
130 gcc's data alignment problem
131
132The following attribute added in vi.c:
133
134static int tabstop;
135static struct termios term_orig __attribute__ ((aligned (4)));
136static struct termios term_vi __attribute__ ((aligned (4)));
137
138reduced bss size by 32 bytes, because gcc sometimes aligns structures to
139ridiculously large values. asm output diff for above example:
140
141 tabstop:
142 .zero 4
143 .section .bss.term_orig,"aw",@nobits
144- .align 32
145+ .align 4
146 .type term_orig, @object
147 .size term_orig, 60
148 term_orig:
149 .zero 60
150 .section .bss.term_vi,"aw",@nobits
151- .align 32
152+ .align 4
153 .type term_vi, @object
154 .size term_vi, 60
155
156gcc doesn't seem to have options for altering this behaviour.