wiki:Component/Loader/PlainFileLoader

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.

Last modified 15 years ago Last modified on Feb 27, 2009, 11:25:35 AM