Re: [amusement] Petit Hello, World!

Top Page

Reply to this message
Author: Lucas Nussbaum
Date:  
To: guilde
Subject: Re: [amusement] Petit Hello, World!
> Créer un programme Hello, World!, le plus petit possible. Le
>     programme doit afficher Hello, World! à l'écran quand il est
>     appelé sans arguments. Il doit ensuite se terminer en renvoyant
>     au shell un code de retour de zéro. Tout ça sous Linux,
>     évidemment !


$ cat hello.c
int main(void)
{
printf("Hello, World\n");
return 0;
}

$ diet -Os gcc -s -o hello hello.c

$ wc -c hello
    716 hello


$ ./hello && echo ok
Hello, World
ok

Alors, je gagne quoi ? :)

Description: diet libc shared libraries - a libc optimized for small size
The diet libc is a C library that is optimized for small size. It
can be used to create small statically linked binaries for Linux
on alpha, arm, ia64, mips, mipsel, ppc, parisc, sparc and x86.
.
The diet libc also supports dynamic linking, currently on the i386
architectures only. This package provides the shared libraries.
.
See http://www.fefe.de/dietlibc/ for more information.

Lucas