I tried to run basic.s on my machine and noticed it crashes. I tracked with truss(1) and realized it's actually trying to execute the wrong system call.
% truss ./basic
Segmentation fault (core dumped)
davide@rabbit1:/exps/llvm-lld/tools/lld/test/elf2 % objdump
davide@rabbit1:/exps/llvm-lld/tools/lld/test/elf2 % truss ./basic
umask(0x2a,0x0,0x0,0x0,0x0,0x0) = 18 (0x12)
SIGNAL 11 (SIGSEGV)
process exit, rval = 0
POSIX doesn't know about syscall numbers (or in general system calls), so this code is inherently unportable In reality, it's fairly unlikely somebody assigns '1' to something different than exit() so we should be able to run this code on several UNIXes even if it was written with Linux as target.