< Compile Options / Optimize Options >
The default for this option is map when the optimize=max option has been specified.
When the map option is specified, a base address is set by using an external symbol-allocation information file created by the optimizing linkage editor, and a code that uses addresses relative to the base address for accesses to global or static variables is generated. |
When accesses to external variables are to be optimized by the map option, how the map option is used differs according to the specification of the output option. |
[output=abs or output=mot is specified] |
[output=obj is specified] |
When the order of the definitions of global variables or static variables has been changed, a new external symbol-allocation information file must be created. If any option other than the map option in the previous compilation differs from the one in the current compilation, or if any contents of a function are changed, correct operation is not guaranteed. In such a case, a new external symbol-allocation information file must be created. |
This option is only valid for the compilation of C/C++ source programs. It does not apply to programs that have been compiled with the output=src specification or to programs written in assembly language. |
When continuous data sections are allocated after a program section, optimization of external variable accesses may be disabled or may not be performed sufficiently. For performing optimization to a maximum extent in a case in which multiple sections are allocated continuously, allocate the program section at the end. An example is shown below. |
In the above example, section P is allocated from address 0x100, sections C1 and C2 are allocated immediately after section P, and section C3 is allocated from address 0x400. Since sections C1 and C2 are allocated continuously after section P, section P should be allocated behind section C2. Section C3 is not involved because it is not allocated continuously. |