Re: An "ELKS BusyBox" is in progress; 24.5% size savings so far!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/2012 1:16 AM, Kirn Gill wrote:
Most of the space-savings comes from not having to duplicate the C
library around (due to static linking). If there was a shared library
mechanism (which someone once suggested via interrupt vectors - does
that even work?), then this space-savings would be far less.
That's not entirely true. Some of the commands are from sash, and have tons of 1:1 copied code to split them into separate commands, and I have fixed that up; some other commands shared routines as well, and those are also combined. The C library is not the only duplication waste involved. Additionally, commands like "true" and "false" are so trivial that their .c files were destroyed in favor of pushing their code into a single line in busyelks.c. I have yet to merge the usage() calls together, but I've already packed a lot of stuff into one executable, and it works as expected using the elksemu command. Once I get some of the ugliness fixed up, I'll push this to Git.

13682 ./sed.o  13058 ./stty.o  11599 ./compress.o
10680 ./diff.o  8806 ./find.o  8582 ./sort.o
8423 ./ed.o   5592 ./banner.o  3647 ./tar.o
3549 ./ls.o   3105 ./cut.o   3021 ./test.o
2633 ./grep.o  2593 ./dd.o   2565 ./tail.o
2347 ./cal.o  2254 ./sash.o   2003  ./tr.o
1897 ./cksum.o  1869 ./date.o  1771 ./uniq.o
1696 ./xargs.o  1594 ./lib/wildcards.o  1594 ./du.o
1526 ./wc.o   1475 ./l.o  1419 ./busyelks.o
1299 ./write.o  985 ./cmp.o   820 ./head.o
785 ./more.o  779 ./mkdir.o   764 ./lib/copyfile.o
762 ./tee.o   738 ./rmdir.o   699 ./mknod.o
697 ./mesg.o  676 ./ln.o  580 ./cat.o
571 ./which.o  569 ./lib/sashlib.o   509 ./mv.o
477 ./chgrp.o  476 ./chown.o  437 ./lib/modestring.o
430 ./printenv.o  420 ./basename.o   358 ./mkfifo.o
343 ./chmod.o  334 ./cp.o  326 ./rm.o
314 ./dirname.o  301 ./touch.o  287 ./lib/timestring.o
269 ./lib/chunks.o  262 ./lib/buildname.o  243 ./echo.o
238 ./whoami.o  233 ./logname.o   201 ./yes.o
194 ./pwd.o   179 ./lib/stripslash.o  139 ./lib/isadir.o
134 ./usage.o  132 ./lib/basename.o

text    data    bss     dec     hex     filename
51904   7576    37124   96604   1795c   busyelks

-rwxr-xr-x 1 root root 59512 Feb 22 09:33 busyelks*

Jody Bruchon
--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux