Глава 8. elf32: Executable and Linkable Format 32-bit Object Files

Содержание

8.1. Debugging Format Support
8.2. ELF Sections
8.3. ELF Directives
8.3.1. IDENT: Add file identification
8.3.2. SIZE: Set symbol size
8.3.3. TYPE: Set symbol type
8.3.4. WEAK: Create weak symbol
8.4. ELF Extensions to the GLOBAL Directive
8.5. ELF Extensions to the COMMON Directive
8.6. elf32 Special Symbols and WRT

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. A generic interface to both is also provided, elf, which selects between elf32 and elf64 based on the target machine architecture (see Раздел 1.3.1.7).

Yasm defaults to BITS 32 mode when outputting to the elf32 object format.

8.1. Debugging Format Support

ELF supports two debugging formats: stabs (see Глава 18) and dwarf2 (see Глава 17). Different debuggers understand these different formats; the newer debug format is dwarf2, so try that first.