busybox --gc-sections thing

Denis Vlasenko vda.linux at googlemail.com
Sat Dec 9 19:08:19 PST 2006


On Thursday 07 December 2006 13:59, shevek at bur.st wrote:
> Denis,
> 
> I am merely an occaisional user of busybox, but I am troubled by the  
> current status.
> 
> 1) no sig for latest release
> 
> 2) latest release was to address an issue which seems to be due to an  
> unwise default setting that saves only 5k? why not simply set the  
> default to not use the --gc-sections thing, and allow people to switch  
> it on at-their-own-risk?

Because garbage collecting unused sections at link time
is the Right Thing to do. It's strange that unix linkers started to have
this feature only now. Borland's Turbo Pascal had something like that
years ago.

bbox project was going to great pains to work around that,
but this feature of ld looks more mature now, so why we shouldn't
use it? It saves size.

> 3) your comment that glibc is useless for static linking flies in the  
> face of popular opinion and widespread practice, as well as busybox  
> documentation and precedent...

Static glibc sucks in ~400k into even simplest executables
("Hello world"-class). With that kind of bloat, you can use
non-busyboxed utilities as well.

Static glibc cannot do name resolution. Forget "ping <hostname>" -
it won't work. (Didn't check recently - maybe fixed now).

> http://www.busybox.net/lists/busybox/2006-November/025240.html
> 
> http://www.busybox.net/lists/busybox/2006-April/020147.html
> 
> From the two messages above, and reading your comments about 1.2.2.1  
> it seems to me, a mere occaisional user who has not been following the  
> mailing lists, that you have taken a stance and are unwilling to back  
> down, therefore have not implemented an obvious workaround. Is this  

I am willing to automatically drop --gc-sections option to ld
if we know that we do "glibc+static" thing. Q: how to detect
that we are doing that thing?

> possible? I have no grounds to criticise you, but I hope for more from  
> the maintainer of the app.
--
vda


More information about the busybox mailing list