GSoC2008 Stefan Project Plan
From Syslinux Wiki
Contents |
[edit] Project Plan: Stefan Bucur, Dynamic Module Loading Using the ELF Format
[edit] General Architecture
[edit] Dynamic Modules
[edit] 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):
- 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.
- 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.
- 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.
- 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.
- 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(), andfclose().
- The module I/O operations were abstracted into separate functions that were implemented using only
- 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.
- Compile the code against SYSLINUX
klibclibrary, and fix any porting errors. (07/01/08)- I have implemented a function equivalent with
posix_memalign(), and filled in the SYSLINUXelf.hheader with definitions pertaining to object linking.
- I have implemented a function equivalent with
Yet to Be Done:
