L4 loader - internals

Mainpage file doc/general1.dox

Loader-style applications

This is the reference manual for the L4 Loader. For information on how to use the loader please see the L4 Loader User Manual.

The L4 Loader distinguishes between Loader-style L4 tasks and "normal" static linked L4 applications. Applications linked against the libraries libld-l4.s.so and libloader.s.so are denoted as Loader-style applications. The libld-l4.s.so contains an ELF binary interpreter, the libloader.s.so contains interfaces to several servers of the L4 environment and also some basic libraries:

By using a separate library for these services it is possible to initialize the region manager independent from the application. Therefore it is possible to page the program regions by the region manager. Though the region manager itself has to be paged by an external pager. While this functionality is covered by the loader, the pager will be separated to an extra server in the future.

To build that library you have to configure your L4 environment accordingly, whereby this feature is enabled by default.

Initialization of Loader-style applications

Loading of applications is performed in several steps:
  1. An L4 task id is allocated at the task server.
  2. The Loader prepares an application specific L4Env infopage and maps some trampoline code into the new tasks address space, which later puts the addresses of the multiboot and L4Env infopage into some registers.
  3. The L4 Loader loads the libld-l4.s.so interpreter into the new address space.
  4. All program sections are shared with the application.
  5. The L4 task is started by the task server and executes the trampoline code. the libld-l4.s.so interpreter arranges the address space according to the ELF binary arrangement. After that the entry point provided by libloader.s.so l4loader_init() is called.
  6. The region manager of the new application provided by libloader.s.so is initialized and relocates all not relocated program sections.
  7. Then the library initializes the remaining modules of the L4 environment (mainly thread and semaphore).
  8. The application is finally started either by calling multiboot_main() or main() (the first has precedence).

L4 Loader Reference Manual, part of DROPS  © 2000-2003