[BusyBox] [PATCH] size optimization for fdformat.c
Manuel Novoa III
mjn3 at codepoet.org
Thu Jan 22 13:59:06 UTC 2004
Hello,
On Thu, Jan 22, 2004 at 02:14:14PM +0000, Tito wrote:
> on the other side all the error obj files sum up to about 9k so by using one
> function there would be size reduction to balance the overhead of one more arg for every function
> and also the number of x and other bb functions would decrease
> saving more space.
>
> -rw-r--r-- 1 root root 968 Jan 6 14:19 error_msg_and_die.o
> -rw-r--r-- 1 root root 864 Jan 6 14:19 error_msg.o
> -rw-r--r-- 1 root root 892 Jan 6 14:19 herror_msg_and_die.o
> -rw-r--r-- 1 root root 792 Jan 6 14:19 herror_msg.o
> -rw-r--r-- 1 root root 892 Jan 6 14:19 perror_msg_and_die.o
> -rw-r--r-- 1 root root 792 Jan 6 14:19 perror_msg.o
> -rw-r--r-- 1 root root 808 Jan 6 14:20 perror_nomsg_and_die.o
> -rw-r--r-- 1 root root 788 Jan 6 14:20 perror_nomsg.o
> -rw-r--r-- 1 root root 1080 Jan 6 14:20 verror_msg.o
> -rw-r--r-- 1 root root 1028 Jan 6 14:20 vherror_msg.o
> -rw-r--r-- 1 root root 1092 Jan 6 14:20 vperror_msg.o
> tot. 9996
>
> and last but not least we would have a more flexible (and easy) api which could
> lead to more size optimization.
The size reported by 'ls' is meaningless in this contexts. You need to
use 'size' to see how much each object adds to the text, data, and bss
sections.
To get a breakdown of sizes for functions and data within an object
file, you can use something like 'nm -S --size-sort -t d <object file>'.
Manuel
More information about the busybox
mailing list