format ELF
section '.text' executable
extrn printf
public main
main:
push msg
call printf
add esp,4
ret
section '.data' writeable
msg db "Hello world!",0
There is small diference when compiling this file
fasm hellolibc.asm hellolibc.o
gcc -o hellolibc hellolibc.o