exporting argc/argv to applets

Rob Landley rob at landley.net
Fri Jul 7 22:19:18 UTC 2006


On Friday 07 July 2006 1:08 am, Rich Felker wrote:
> On Thu, Jul 06, 2006 at 08:34:54PM -0400, Mike Frysinger wrote:
> > On Thursday 06 July 2006 15:18, Rich Felker wrote:
> > > Global variables are not bp+offset, just fixed address.
> >
> > that depends on your build ... with a non-pic binary this is correct
>
> Yes we're talking about i386 which always has MMU (afaik anyway), so
> building with PIC would be rather stupid..

Go look at http://www.gentoo.org/proj/en/hardened/pic-internals.xml sections 3 
and 4, and contemplate that like standard system libraries, BusyBox is _also_ 
likely to have lots and lots of copies of the same executable in memory at 
once, and could dirty lots of pages with unnecessarily scattered relocations.  
PIC can optimize for DRAM usage at the expense of on-disk binary size, on a 
system with an MMU and multiple copies of the same process.

If you reply "just statically link everything", I'm going to put you in my 
spam filter.  Someday you may realize that the definition of "general purpose 
tool" isn't "it does the one strange thing you want to do, and everything 
else is broken".  (Nor is "everybody who doesn't do it my way is stupid" a 
useful attitude.)

> > throw in the shared busybox lib and it all goes to hell ;)
>
> Also sounds like a very bad idea..

At present, I consider the shared busybox library useless.  I hope to get 
standalone applet building merged in this dev cycle, but it's fifth or sixth 
on the todo list.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list