SPRU513Z August 2001 – October 2023 SM320F28335-EP
When automatically generating copy tables, the linker provides a way to compress the load-space data. This can reduce the read-only memory foot print. This compressed data can be decompressed while copying the data from load space to run space.
Copy table compression is supported only when you use EABI object modules by specifying the --abi=eabi option. This feature is not supported for COFF object modules.
You can specify compression in two ways:
table( name, compression= compression_kind)
The compression_kind can be one of the following types:
A table() operator without the compression keyword uses the compression kind specified using the command line option --copy_compression. If no compression_kind was specified with the command-line option, the default is LZSS compression.
When you choose compression, it is not guaranteed that the linker will compress the load data. The linker compresses load data only when such compression reduces the overall size of the load space. In some cases even if the compression results in smaller load section size the linker does not compress the data if the decompression routine offsets for the savings.
For example, assume RLE compression reduces the size of section1 by 30 bytes. Also assume the RLE decompression routine takes up 40 bytes in load space. By choosing to compress section1 the load space is increased by 10 bytes. Therefore, the linker will not compress section1. On the other hand, if there is another section (say section2) that can benefit by more than 10 bytes from applying the same compression then both sections can be compressed and the overall load space is reduced. In such cases the linker compresses both the sections.
You cannot force the linker to compress the data when doing so does not result in savings.
You cannot compress the decompression routines or any member of a GROUP containing .cinit.