3 ms·
Static linking to Musl libc is pretty minimal, not sure you really need assembly strace -tt /tmp/test 15:38:33.245549 execve("/tmp/test", ["/tmp/test"], [/* 1
by justincormack 12y ago
Static linking to Musl libc is pretty minimal, not sure you really need assembly
strace -tt /tmp/test
15:38:33.245549 execve("/tmp/test", ["/tmp/test"], [/* 16 vars */]) = 0
15:38:33.246436 arch_prctl(ARCH_SET_FS, 0x601070) = 0
15:38:33.246617 set_tid_address(0x6010a0) = 17227
15:38:33.246875 exit_group(0) = ?
15:38:33.247060 +++ exited with 0 +++
- lunixbochs 12y agoMy solution in the final trace was a minimal (300 sloc) libc with a total of two lines of assembly (to bootstrap syscalls) and didn't do any syscalls beside read, write, and exit. I've also toyed with the idea of testing exit via error (SIGSEGV, SIGILL, etc) because cleanup might be faster on a forced exit.