[BusyBox] An historic moment!

Vladimir N. Oleynik dzo at simtreas.ru
Tue Jan 16 10:11:51 UTC 2001


Erik Andersen wrote:

> > $ ldd hl
> > statically linked (ELF)
> > ^^^^^^^^^^^^^^^^^^_____
> >
> > $ ls -l hl
> > -rwxr-xr-x   1 vodz      root         3280 Jan 16 11:39 hl
> > ______________________________________^^^^
> >
> >
> > Its point of controversy for best :))
> 
> I think you missed the point.  

I have point. :)

> Can dietlibc compile busybox and other real applications?

YES! :)

$ cd /bin; ls -ali ping passwd
 5 -r-sr-xr-x   2 root     root          328 Jan 15 21:24 passwd
 5 -r-sr-xr-x   2 root     root          328 Jan 15 21:24 ping
^^^___^__________________________________^^^
_^_(hard link)


Code:

#include <unistd.h>

void exit(int code) { _exit(code); }
extern char **environ;

int main(int argc, char **argv) {
execve("/bin/busybox", argv, environ);
write(2, "Can`t start busybox!\n", 21);
return 1;
}


> Sure, I can do static libs too (though it looks like I have 4 bytes
> more overhead for the same trivial application -- I had to add in a
> few useless things to make the shared lib loader happy).

If static size is smallest with compare dynamic linked 
application + size lib, best usage static and put lib for other
applications.


Oh, sorry. Your work is authoritarian and very slow! :(


--w
vodz





More information about the busybox mailing list