wiki:Component/Loader/PlainFileLoader

Version 2 (modified by Nicolas Pouillon, 14 years ago) (diff)

--

Use

You have to compile your platform with

 Uses('common:plain_file_loader'),

You have to pass a string with 3 information to this loader:

  • filename to load
  • address to load it at
  • flags for the section. They can be any meaningful combinaison of
    • RO: read-only
    • D: data
    • C: code

Flags should be concatenated (like fopen() read/write mode)

This is a string like filename@load_address:flags.

  • Dont put spaces (unless your filename contains some)
  • Put the colon (:), even without flags.

example:

This will load file disk_image.bin at address 0x45000000, marking it as Read-only data.

   soclib::common::Loader loader( "disk_image.bin@0x45000000:ROD" );

What gets loaded

The whole binary file.