Payload Initialisation

The lib/payload.c file contains routines for completing the basic initialisation of a payload before any application main program can be invoked. These routines are called by the start-up routine but are implemented in C for convenience.

init_bss
Initialises the .bss section of the payload so that uninitialised global and static variables have a well-defined initial value of zero.
relocate_data
Copies the contents of the payload's .data section to writable memory so that mutable data structures can be modified.