Changes between Initial Version and Version 1 of Component/Loader


Ignore:
Timestamp:
Feb 23, 2009, 11:32:33 PM (15 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Component/Loader

    v1 v1  
     1= Loader =
     2
     3Loader is an utility used to load binary files into platforms.
     4It holds information about one or more files, and may load any loadable section by its address and size.
     5
     6== Usage ==
     7
     8 * {{{Loader( const std::string &filename )}}}
     9
     10Creates a new Loader, capable of loading `filename`.
     11
     12 * {{{void load( void *buffer, uintptr_t address, size_t length )}}}
     13
     14`buffer` must be at least `length` bytes long.
     15
     16Loads in buffer any segment overlapping memory region between `address` to `address+length`.
     17Used addresses are LMAs (loading memory address) of sections.
     18
     19If a section is too big to fit in the given buffer, it is truncated and a warning is generated to stderr.
     20
     21== Handlers ==
     22
     23Loader does not directly handle different file types. It relies on handlers to support all needed file types.
     24Your platform must link against needed file loader handler to work properly.
     25
     26For instance, to support ELF files, you need to add the following line to your platform_desc:
     27{{{
     28  Uses('common:elf_file_loader'),
     29}}}