aboutsummaryrefslogtreecommitdiff
path: root/docs/busybox.net/FAQ.html
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-07-31 04:25:00 +0000
committerRob Landley <rob@landley.net>2005-07-31 04:25:00 +0000
commitc7a3e1be8fe22b271193840a5b6bdde93da147ae (patch)
tree4a4f40c2424b42f18e609bae3357adca2a31eac9 /docs/busybox.net/FAQ.html
parente70aa9de7ebd8674bfeed74e6cd5c3d6d377c721 (diff)
downloadbusybox-c7a3e1be8fe22b271193840a5b6bdde93da147ae.tar.gz
Fix "nm --size-sort" on the busybox binary and document how to make it work.
Diffstat (limited to 'docs/busybox.net/FAQ.html')
-rw-r--r--docs/busybox.net/FAQ.html87
1 files changed, 26 insertions, 61 deletions
diff --git a/docs/busybox.net/FAQ.html b/docs/busybox.net/FAQ.html
index a2264f9fe..a2d20bf5c 100644
--- a/docs/busybox.net/FAQ.html
+++ b/docs/busybox.net/FAQ.html
@@ -246,68 +246,33 @@ have additions to this FAQ document, we would love to add them,
trust PayPal...
<hr />
+<p>
+<h2><a name="optimize">I want to make busybox even smaller, how do I go about it?</a></h2>
+<p>
+ To conserve bytes it's good to know where they're being used, and the
+ size of the final executable isn't always a reliable indicator of
+ the size of the components (since various structures are rounded up,
+ so a small change may not even be visible by itself, but many small
+ savings add up).
+</p>
+<p>
+ To examine a busybox binary with an eye to saving bytes, build an
+ optimized debug version and run the "nm" command against it, like so:
+</p>
+<p>
+ make clean && make STRIPCMD=/bin/true && nm --size-sort busybox
+</p>
+<p>
+ This gives a list of symbols and the amount of space allocated for
+ each one, sorted by size. (Note: do not enable CONFIG_DEBUG for this,
+ as that disables compiler optimization which is great for running gdb
+ but misleading when trying to figure out how much space each component
+ is really using under normal circumstances.)
+</p>
+<hr />
+
+
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
<br>
<br>
<br>