ARM: UNKNOWN DATA AT END OF IMAGE
Information in this article applies to:
During debug I recognized a bunch of data at the end of my application image. The data is accessed during startup by a function called __decompress1 which is only available as assembler source code. The MAP file gives no clue on this data.
What is this data?
These data are compressed RW initialization data used to initialize variables <> 0. The function __decompress1 is part of the standard ARM library initialization code and is linked automatically when __main is referenced in the startup code.
The amount of RW initialization data (compressed or not) can be calculated manually from the section Memory Map of the Image of the MAP file. The following samples are from an image with uncompressed and compressed RW initialization data:
Load Region LR_IROM1 (Base: 0x08002000, Size: 0x00000dfc, Max: 0x00020000, ABSOLUTE) Execution Region ER_IROM1 (Base: 0x08002000, Size: 0x00000de4, Max: 0x00020000, ABSOLUTE)
The Load Region size of LR_IROM1 is 0x00000dfc, the size of the execution region ER_IROM1 is 0x00000de4. The difference is 24 bytes (LR_IROM1 size - ER_IROM1 size). This indicates that 24 bytes are appended at the end of your image. In this case __decompress1 is not referenced because the data are not compressed, instead __scatter_copy is referenced.
Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002964, Max: 0x0001e000, ABSOLUTE, COMPRESSED[0x0000280c]) Execution Region ER_IROM1 (Base: 0x08000000, Size: 0x0000273c, Max: 0x0001e000, ABSOLUTE)
Above, the size of RW initialization data is 552 bytes. Due to the RW data compression, the total size of LR_IROM1 is 0x280c Bytes as indicated by COMPRESSED[0x0000280c].
In any case, RW data compression can be turned off by adding --datacompressor=off to Options for Target -> Linker -> Misc Control.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Wednesday, January 25, 2017
of your data.