paul@150 | 1 | = Payload Initialisation = |
paul@150 | 2 | |
paul@150 | 3 | The `lib/payload.c` file contains routines for completing the basic |
paul@150 | 4 | initialisation of a payload before any application main program can be |
paul@150 | 5 | invoked. These routines are called by the [[../start|start-up]] routine but |
paul@150 | 6 | are implemented in C for convenience. |
paul@150 | 7 | |
paul@150 | 8 | `init_bss` :: Initialises the `.bss` section of the payload so that |
paul@150 | 9 | uninitialised global and static variables have a well-defined |
paul@150 | 10 | initial value of zero. |
paul@150 | 11 | |
paul@150 | 12 | `relocate_data` :: Copies the contents of the payload's `.data` section to |
paul@150 | 13 | writable memory so that mutable data structures can be |
paul@150 | 14 | modified. |