Skip to content

Commit

Permalink
Adjust "true.c" and compilation flags to get it down to 8.6K (still n…
Browse files Browse the repository at this point in the history
…owhere near 125b, but better than the >100K it used to be)
  • Loading branch information
tianon committed Sep 21, 2018
1 parent b1213c2 commit aac0ca4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion true/Makefile
Expand Up @@ -3,7 +3,8 @@ true-asm: true.asm
chmod +x true-asm

true-c: true.c
gcc -Os -o $@ -static $<
gcc -o $@ -static -Os -nostartfiles -fno-asynchronous-unwind-tables $<
strip $@

true-go: true.go
CGO_ENABLED=0 go build -o $@ -ldflags '-d -s -w' $<
Expand Down
4 changes: 3 additions & 1 deletion true/true.c
@@ -1 +1,3 @@
int main() { return 0; }
#include <unistd.h>
#include <sys/syscall.h>
void _start() { /* _exit(0); */ syscall(SYS_exit, 0); }

0 comments on commit aac0ca4

Please sign in to comment.