public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* Condensing and re-coding programs to save space
@ 2017-02-27 19:53 Jody Bruchon
  2017-02-27 22:02 ` Marc-F. LUCCA-DANIAU
  2017-02-28 21:12 ` Alan Cox
  0 siblings, 2 replies; 7+ messages in thread
From: Jody Bruchon @ 2017-02-27 19:53 UTC (permalink / raw)
  To: ELKS

The recent flare-up of networking development has led to a lot of 
additional small programs on the full disk images and that forced me to 
eliminate other programs from being installed automatically to avoid 
image build failures. I'd like to suggest some things that can be done 
to reduce the amount of space these are taking up.

Since all programs are statically linked to C library components, it 
would be helpful to condense similar programs into a single binary where 
possible, have the Makefile's install section create relative symlinks, 
and change the program's behavior based on the name used to invoke it. 
The code to do this obviously has its own overhead as well, so it's only 
practical if there are enough binaries to justify the trouble. You can 
find useful stuff for this in the "busyelks" project I had been trying 
out and left in the code.

It may also make sense to condense the new non-standard programs like 
the "echo tests" into one binary and choose the specific functionality 
with a command parameter instead.

Another thing is the use of write() instead of [vf]printf(). If a 
program can completely avoid the use of the printf() family of functions 
and use write() instead, it'll make the program significantly smaller on 
disk and in memory. If you must use printf() even once then this isn't 
going to be helpful. If you can get away with write() everywhere 
instead, the program will shrink and we'll be able to fit more on disk.

I'm sure more suggestions could be made and they would be most welcome.

-Jody

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-28 21:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 19:53 Condensing and re-coding programs to save space Jody Bruchon
2017-02-27 22:02 ` Marc-F. LUCCA-DANIAU
2017-02-27 22:11   ` Jody Bruchon
2017-02-28  9:31     ` Marc-François LUCCA-DANIAU
2017-02-28 11:54       ` Georg Potthast 2
2017-02-28 12:17         ` Jody Bruchon
2017-02-28 21:12 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox