Re: Announce: initrd-tftp 0.1

From: david parsons (orc@pell.portland.or.us)
Date: Sun Jan 09 2000 - 19:08:11 EST


In article <linux.kernel.20000109145641.E14820@worldvisions.ca>,
Avery Pennarun <apenwarr@worldvisions.ca> wrote:

>There is something seriously wrong with libc that causes this bloat. The
>following program compiles to 202640 bytes on my system:
>
> int main() { }
>
>Compiled with:
>
> gcc -static -s -O testy.c -o testy

    It's because you're using the Wrong Library(tm):

root@india.pell.portland.or.us# cc -baout -m386 -static -O -s -o testy testy.c
root@india.pell.portland.or.us# ls -l testy
-rwxr-xr-x 1 root root 16384 Jan 09 15:58 testy
root@india.pell.portland.or.us# ldd testy
        statically linked

    And this is only because libc's exit() code drags in stuff to shut
    down std{in|out|err}, which fouls an amazingly large amount of code.

                  ____
    david parsons \bi/ add printf("hello,sailor\n"); and the code bloats
                   \/ up to 52k :-(

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:15 EST