11.4 The assembler
The purpose of the assembler is to convert assembly language into
machine code and generate an object file. When there are calls to
external functions in the assembly source file, the assembler leaves the
addresses of the external functions undefined, to be filled in later by
the linker. The assembler can be invoked with the following command
line:
$ as hello.s -o hello.o
As with GCC, the output file is specified with the -o
option.
The resulting file 'hello.o' contains the machine instructions for
the Hello World program, with an undefined reference to
printf
.