First step of building an executable is compiling (or assembling) object file from the source:
For nasm example:
$ nasm -f elf hello.asm # 32 bit target $ nasm -f elf64 hello.asm # 64 bit target
For gas example:
$ as -o hello.o hello.S
This makes hello.o
object file.