GSoC2008 Stefan Project Plan

From Syslinux Wiki
Jump to: navigation, search

Project Plan: Stefan Bucur, Dynamic Module Loading Using the ELF Format

General Architecture


Dynamic Modules


Milestones and Timeline

A detailed description of what I've done for each milestone can be found in the journal. The milestones below are numbered according to their initial planning in my mind - however some of them are not interrelated and were achieved in a different order (as it can be seen from the dates).

Achieved Milestones (as of July 7, 2008):

  1. Study the ELF format specifications and lay down the structure of the module subsystem and the operations available on the data structures. (06/07/08)
    • The specs were taken from the System V ABI.
    • Two kinds of data structures were considered: the general ones that describe the ELF file format (and present in header file elf.h), and the particular ones that describe the SYSLINUX module system.
  2. Read the ELF dynamic object and load the required segments into memory. (06/10/08)
    • A method for computing the module base address had to be derived, based on the ELF specifications.
  3. Perform code relocations and resolve symbol dependencies on other modules. (06/12/08)
    • A particular subproblem of this task was supporting symbol search through the hash tables in the ELF file. In this regard, both the standard System V hashtable and the more performant GNUhash were implemented.
  4. Build a dependency graph that arbiters module traversal and unloading. (06/17/08)
    • The nodes in the graph were the loaded modues, while the links (arcs), were representing the dependencies. A dependency exists between two modules when one of them references (so it relocates) a symbol that is defined in the other module.
  5. Adapt the module loading from the file to use only reading and skipping operations (as on SYSLINUX seeking backwards isn't always possible). (06/17/08)
    • The module I/O operations were abstracted into separate functions that were implemented using only fopen(), fread(), and fclose().
  6. Initial test in user-space the module loading and linking system. (06/12/08)
    • Two modules have been defined, that export and reference some symbols (global data and external functions), and they were loaded and verified that the functions operate correctly.
  7. Compile the code against SYSLINUX klibc library, and fix any porting errors. (07/01/08)
    • I have implemented a function equivalent with posix_memalign(), and filled in the SYSLINUX elf.h header with definitions pertaining to object linking.

Yet to Be Done:

See also