Static bins

Robert Connolly cendres at
Wed Jan 7 13:24:26 PST 2004

Gnu false supports --help and --version. Linus has commented on it saying its 
an example of taking guildlines too far. I don't know what I'm doing but this 
seems to work.

cat > false.c << "EOF"
int main () {exit (1);}
gcc -static -o false false.c

In comparision I think Gnu's False.c is unsafe simply because it accepts 
arguments. When this is built dynamicly linked it's less then 1/3rd the size 
of gnu's false. Staticly its 20+ times bigger. So this would be defintly be 
best in assembly.

Another option is
cat > << "EOF"
#! /bin/sh exit 1

But I have no idea how safe this is.

More information about the hlfs-dev mailing list