[BusyBox] An historic moment!
Erik Andersen
andersen at lineo.com
Tue Jan 16 09:53:48 UTC 2001
On Tue Jan 16, 2001 at 11:54:13AM +0300, Vladimir N. Oleynik wrote:
> $ cat > hl.c
>
> int main(void)
> {
> printf("hello world\n");
> exit(42);
> }
>
> $ make hl.c
> gcc -pipe -march=i386 -mcpu=i386 -Os -fomit-frame-pointer -Wall -fno-builtin
> -nostd
> lib -Iinclude -s -o hl hl.c start.o dietlibc.a -lgcc
> ____________________________________^^^^^^^^^^
>
> $ 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. Can dietlibc act as a shared lib?
Can dietlibc compile busybox and other real applications?
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).
andersen at sage:~/CVS/uClibc$ cd test/silly/
andersen at sage:~/CVS/uClibc/test/silly$ cat hello.c
#include<stdio.h>
#include <stdlib.h>
int main(void)
{
printf("hello world\n");
exit(42);
}
andersen at sage:~/CVS/uClibc/test/silly$ ../../extra/gcc-uClibc/gcc-uClibc-i386 -Os -s hello.c -o hello
andersen at sage:~/CVS/uClibc/test/silly$ strip -x -R .note -R .comment hello
andersen at sage:~/CVS/uClibc/test/silly$ ll ./hello
-rwxr-xr-x 1 andersen andersen 3284 Jan 16 10:52 ./hello*
andersen at sage:~/CVS/uClibc/test/silly$ file ./hello
./hello: ELF 32-bit LSB executable, Intel 80386, version 1, statically linked, stripped
andersen at sage:~/CVS/uClibc/test/silly$ ./hello
hello world
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list