x86 Assembly Language Reference Manual


The main output produced by assembling an input assembly language source file is the translation of that file into an object file in (ELF). ELF files produced by the assembler are relocatable files that hold code and/or data. They are input files for the linker. The linker combines these relocatable files with other ELF object files to create an executable file or a shared object file in the next stage of program building, after translation from source files into object files.

The three main kinds of ELF files are relocatable, executable and shared object files.

The assembler can also produce ancillary output incidental to the translation process. For example, if the assembler is invoked with the -V option, it can write information to standard output and to standard error.

The assembler also creates a default output file when standard input or multiple input files are used. Ancillary output has little direct connection to the translation process, so it is not properly a subject for this manual. Information about such output appears in as(1) manual page.

Certain assembly language statements are directives to the assembler regarding the organization or content of the object file to be generated. Therefore, they have a direct effect on the translation performed by the assembler. To understand these directives, described in Chapter 2, Instruction-Set Mapping ", it is helpful to have some working knowledge of ELF, at least for relocatable files.