Considerations when using a relative address +offset for a load region
There are some considerations to be aware of when using a relative address for a load region.
When using +offset to specify a load region base address:
If the +offset load region LR2 follows a load region LR1 containing ZI data, then LR2 overlaps the ZI data. To fix this, use the ImageLimit() function to specify the base address of LR2.
A +offset load region LR2 inherits the attributes of the load region LR1 immediately before it, unless:
LR1 has the OVERLAY attribute.
LR2 has an explicit attribute set.
If a load region is unable to inherit an attribute, then it gets the attribute ABSOLUTE.
- A gap might exist in a ROM image between a +offset load region and a preceding region when the preceding region has RW data compression applied. This is because the linker calculates the +offset based on the uncompressed size of the preceding region. However, this gap disappears when the RW data is decompressed at load time.