Chapter 2. Overview

Table of Contents
2.1. Object File Formats
2.2. Command Line
2.3. Input Files
2.4. Output (Object) File
2.5. Error and Warning Messages

The GNU assembler is really a family of assemblers. If you have used the GNU assembler on one architecture, you should find a fairly similar environment when you use it on another architecture. Each version has much in common with the others, including object file formats, most assembler directives (often called pseudo-ops) and assembler syntax.

The assembler is primarily intended to assemble the output of the compiler for use by the linker. Nevertheless, we've tried to make the assembler assemble correctly everything that other assemblers for the same machine would assemble.

Unlike older assemblers, the assembler is designed to assemble a source program in one pass of the source file. This has a subtle impact on the .org directive (see .org).

2.1. Object File Formats

The assembler can be configured to produce several alternative object file formats. For the most part, this does not affect how you write assembly language programs; but directives for debugging symbols are typically different in different file formats. See Section 6.5.