3.7.1 Outputting the variable/function information file

-

When the -lnkopt=-vfinfo option is specified, the optimizing linker outputs the variable/function information file.
For details on the -vfinfo option, see "-VFINFO".

-

The optimizing linker significantly reduces the size of the code as a whole by selecting variables and functions on the basis of size of variable and frequency of reference and producing header files (variable/function information files) in which #pragma directives to use the saddr area for the given variables or the callt function for the given functions are added.
For #pragma saddr, see "Using saddr area (#pragma saddr)". For #pragma callt, see "callt function (#pragma callt)".

-

The following variables or functions are not targets of the variable/function information file.
However, interrupt handlers are commented out in the variable/function information file.

-

Standard library functions and runtime library functions

-

Software interrupt handler, hardware interrupt handler, and RTOS interrupt handler

-

Variables or functions defined in the assembly source file

-

The output example of the variable/function information file is shown below.

/* RENESAS OPTIMIZING LINKER GENERATED FILE 2014.10.20 */
/*** variable information ***/
(1)                   (2)      (3)    (4)
#pragma saddr var1 /* count:10,size:1,near */
(5)                         (2)     (3)    (4)  (6)
/* #pragma saddr var2 */ /* count:0,size:2,near,unref */
 
/*** function information ***/
(7)                    (8)      (9)
#pragma callt func1 /* count:20,near */
(10)                         (8)     (9)  (11)
/* #pragma callt func2 */ /* count:0,near,unref */

Number

Description

(1)

Variable information

A declaration of the saddr variable by a #pragma directive is output.

(2)

Number of references

The number of times the variable is referenced is output.

(3)

Size of variable

The size of the variable is output.

(4)

Reference type

The reference type is output as near, far, or saddr.

(5)

Variable information

The variable spilled from the saddr area is output as a comment.

(6)

Supplementary information of variable

Supplementary information of the variable is output. The following items are such supplementary information.

unref: Output when the variable is not referenced.

const: Output for a const variable.

fix: Output when the location of the variable is not relocatable.

unrecognizable: Output when the variable cannot be recognized as a symbol.

(7)

Function information

A declaration of the callt function by a #pragma directive is output.

(8)

Number of references

The number of times the function is referenced is output.

(9)

Method of function call

The method of function call is output as near, far, or callt.

(10)

Function information

The function spilled from the callt area is output as a comment.

(11)

Supplementary information of function

Supplementary information of the function is output. The following items are such supplementary information.

unref: Output when the function is not referenced.

interrupt: Output for an interrupt handler.

unrecognizable: Output when the function cannot be recognized as a symbol.