| 1 | = Use = |
| 2 | |
| 3 | You have to compile your platform with |
| 4 | {{{ |
| 5 | Uses('common:plain_file_loader'), |
| 6 | }}} |
| 7 | |
| 8 | You have to pass a string with 3 information to this loader: |
| 9 | * filename to load |
| 10 | * address to load it at |
| 11 | * flags for the section. They can be any meaningful combinaison of |
| 12 | * RO: read-only |
| 13 | * D: data |
| 14 | * C: code |
| 15 | |
| 16 | Flags should be concatenated (like fopen() read/write mode) |
| 17 | |
| 18 | This is a string like {{{filename@load_address:flags}}} |
| 19 | |
| 20 | example: |
| 21 | |
| 22 | This will load file {{{disk_image.bin}}} at address 0x45000000, marking it as Read-only data. |
| 23 | |
| 24 | {{{ |
| 25 | soclib::common::Loader loader( "disk_image.bin@0x45000000:ROD" ); |
| 26 | }}} |
| 27 | |
| 28 | = What gets loaded = |
| 29 | |
| 30 | The whole binary file. |