lkml.org 
[lkml]   [2000]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Announce: initrd-tftp 0.1
    Date
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:55    [W:5.233 / U:1.832 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site