This project is read-only.

Elf32 Linker Format

This page sums up the most important parts of the Elf32 Objectfile Format.

File Format

ELF Header
{Program Header Table} (optional)
Section 1
Section n
Section Header Table

ELF Header

The ELF header is mandatory and acts as a "road map" containing the files structure.

public struct Elf32Header
    byte Ident[16];
    ushort FileType;
    ushort MachineType;
    uint Version;
    uint EntryAdress;
    uint ProgramHeaderOffset;
    uint SectionHeaderOffset;
    uint Flags;
    ushort ElfHeaderSize;
    ushort ProgramHeaderEntitySize;
    ushort ProgramHeaderEntryNumber;
    ushort SectionHeaderSize;
    ushort SectionHeaderEntryNumber;
    ushort SectionHeaderStringIndex;

Section Headers

public struct SectionHeader
    uint Name;
    uint Type;
    uint Flags;
    uint Address;
    uint Offset;
    uint Size;
    uint Link;
    uint Info;
    uint AddressAlignment;
    uint EntitySize;

Last edited Nov 21, 2008 at 9:50 AM by Kintaro, version 1


No comments yet.