File Decompression

File Decompression

As I discussed earlier, a typical application executable might be COFF, ELF, or AOUT. Each of these file formats has multiple sections of text and data that must be transferred from the flash space to some RAM/DRAM space from where applications execute. TFS extends the normal format of these files by allowing the individual sections within the file to be compressed. By default, the executable is uncompressed, and the data is transferred from flash memory to RAM.

TFS supports section-by-section compression to allow the section headers to remain uncompressed even though the balance of the file is compressed. If compression were implemented as an all-or-nothing file-level option, the entire file would need to be decompressed into RAM to extract the section information only to be recopied to its load position once that information could be extracted from the section information.

The alternative is to compress only the individual sections within the file. This section-at-a-time decompression leaves all of the relocation information of the formatted executable readily available yet still provides the advantages of compression avoiding the double-memory copy that would be needed if the entire file were compressed.

image from book
Figure 7.11: TFS File Decompression Strategy.

All sections of the file are compressed within the format of the file. This allows the ELF format to stay intact, but still supports a compressed image.



Embedded Systems Firmware Demystified
Embedded Systems Firmware Demystified (With CD-ROM)
ISBN: 1578200997
EAN: 2147483647
Year: 2002
Pages: 118
Authors: Ed Sutter

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net