8.8.5.4 Run-Time Decompression
During run time you call the run-time-support routine copy_in() to copy the data from load space to run space. The address of the copy table is passed to this routine. First the routine reads the record count. Then it repeats the following steps for each record:
- Read load address, run address and size from record.
- If size is zero go to step 5.
- Call memcpy passing the run address, load address and size.
- Go to step 1 if there are more records to read.
- Read the first byte from the load address. Call this index.
- Read the handler address from (&__TI_Handler_Base)[index].
- Call the handler and pass load address + 1 and run address.
- Go to step 1 if there are more records to read.
The routines to handle the decompression of load data are provided in the run-time-support library.