Table of Contents
The Executable and Linkable Object Format is the primary object format for many operating systems including FreeBSD or GNU/Linux. It appears in three forms:
Yasm only directly supports relocatable object files. Other tools, such as the GNU
Linker ld, help turn relocatable object
files into the other formats. Yasm supports generation of both 32-bit and 64-bit ELF
files, called elf32
and elf64
.
An additional format, called elfx32
, is a 32-bit ELF file
that supports 64-bit execution (instructions and registers) while limiting pointer sizes
to 32-bit.
Yasm defaults to BITS 32
mode when outputting to the
elf32
object format.
ELF supports two debugging formats: stabs
(see Chapter 20) and dwarf2
(see Chapter 19). Different debuggers
understand these different formats; the newer debug format is dwarf2
, so try that first.