Writing

Tutorials and articles that I have written.

  1. Libelf by Example [also available at SourceForge]

    A short tutorial introduction to libelf, a library for manipulating ELF objects.

    It covers:

    1. Getting started with libelf: obtaining a handle to an ELF object, establishing a working ELF version, and handling errors reported by libelf.
    2. How ELF data structures are laid out in-memory and on disk, the notions of “file representation” and “memory representation”, how to write applications that can handle non-native binaries.
    3. ELF Segments and the ELF Program Header Table, retrieving the program header table from an ELF executable and the meaning of the fields of a program header table entry.
    4. How data is stored inside ELF sections, the ELF Section Header Table, and how to traverse the sections in an ELF object.
    5. How to create new ELF objects: the rules for ordering individual API calls, the default object layout implemented by libelf, and how to specify custom layouts.
    6. ar archives: their structure, and how to read the contents of these archives using the APIs provided by libelf.
  2. Building Products with FreeBSD [FreeBSD Documentation, 2006]

    An article highlighting the characteristics of FreeBSD that make it an excellent substrate for product development. The article suggests a few “best practices” for organisations to follow when collaborating with the FreeBSD project.