Language Implementation
7-27
7
Selecting Functions for Compression
The gcc960
mcave option, the ic960 Gcave option, or #pragma cave are
used to designate the specified functions as secondary. You can use
runtime profile information generated by gcov960 to aid in selecting the
set of secondary functions.
Linking
The compiler places secondary function bodies within special CAVE
sections (named
cave) in each generated object file. The linker combines
all input CAVE sections into one output CAVE section. Due to
interdependencies between data or function addresses within compressed
secondary functions and their compressed representations, address
assignment must be done prior to compressing the secondary functions.
As a result, a gap is formed between the compressed CAVE section and
the section that follows, as shown below.
Before Linking After Linking
.text section .text section
uncompressed
compressed cave
section
cave section gap in
memory
.data section .data section
heap heap
stack stack
To utilize the compression savings the developer must use linker options
or directives to position the CAVE section last in read-only memory.