[BusyBox-cvs] svn commit: trunk/busybox: docs/busybox.net
landley at busybox.net
landley at busybox.net
Sun Jul 31 04:25:00 UTC 2005
Author: landley
Date: 2005-07-30 22:25:00 -0600 (Sat, 30 Jul 2005)
New Revision: 10991
Log:
Fix "nm --size-sort" on the busybox binary and document how to make it work.
Modified:
trunk/busybox/Rules.mak
trunk/busybox/docs/busybox.net/FAQ.html
Changeset:
Modified: trunk/busybox/Rules.mak
===================================================================
--- trunk/busybox/Rules.mak 2005-07-31 03:50:40 UTC (rev 10990)
+++ trunk/busybox/Rules.mak 2005-07-31 04:25:00 UTC (rev 10991)
@@ -169,7 +169,7 @@
STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
else
CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG
- LDFLAGS += -s -Wl,-warn-common
+ LDFLAGS += -Wl,-warn-common
STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment
endif
ifeq ($(strip $(CONFIG_STATIC)),y)
Modified: trunk/busybox/docs/busybox.net/FAQ.html
===================================================================
--- trunk/busybox/docs/busybox.net/FAQ.html 2005-07-31 03:50:40 UTC (rev 10990)
+++ trunk/busybox/docs/busybox.net/FAQ.html 2005-07-31 04:25:00 UTC (rev 10991)
@@ -246,70 +246,35 @@
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>
<!--#include file="footer.html" -->
More information about the busybox-cvs
mailing list