 |
|
 |
RENESAS TOOL NEWS on April 16, 2005: RSO-SHC-050416D
A Note on Using the Optimizing Linkage Editor
for the SuperH RISC Engine, H8, H8S, and H8SX Families of MCUs |
Please take note of the following problem in using the optimizing linkage editor included with the C/C++ compiler package for the SuperH RISC engine; and the one for the H8, H8S, and H8SX families of MCUs:
- On linkage list files generated by the optimizing linkage editor
- Product and Version Concerned
The linkage editor V.9.00.00 included with the following compiler packages are concerned:
- C/C++ compiler package V.9.00 Release 00 or later for the SuperH RISC engine family
- C/C++ compiler package V.6.01 Release 00 or later for the H8, H8S, and H8SX families
The linkage editor is hereafter called the linker.
To check for the version number of your linker, follow these steps:
| (1) |
In the High-performance Embedded Workshop, open the Tool menu and select the Administration command. The Tool Administration dialog box appears. |
| (2) |
Select the name of your compiler package out of the "Toolchains " in the Registered Components list and click the Properties button. The Properties dialog box opens. |
| (3) |
Click the Information tab, and you see the version number of your. linker.
Example: Optimizing Linkage Editor (V.9.00.02) |
Note that the version numbers hereafter presented are those of the linker.
- Description
The linker generates the linkage list files (with extension ".map") to which the names of the variables and functions (the symbol names) are output.
Be aware that the symbol names given by the linker V.8.00.08 or earlier are different from those given by V.9.00.00 or later. The differences are as follows:
| V.8.00.08 and earlier: |
Gives the symbol names where "_" is prefixed to the name of defined variables and functions in C-source programs, and gives them conforming to source-file-description format in C++ source programs. |
| V.9.00.00 and later: |
May gives symbol names used in the tools for their own. |
- 2.1 Conditions
- This problem occurs if the following conditions are all satisfied:
| (1) |
The "list" option of the linker is used. |
| (2) |
Any of the following "show" options of the linker is used:
- show
- show=symbol
- show=reference
- show=xreference |
| (3) |
Object files input to the linker meet any of the following requirements:
a. In a file exists a symbol declared to be static.
b. Files are generated by compiling the source files with extension ".cpp"*.
c. Files are generated by compiling source files using the lang=cpp option*. |
* The compiler interprets those files as C++ source files.
- 2.2 Examples
-
| (1) |
Symbol names declared to be static outputted (Condition 3-a)
In source file
---------------------------------------------------------------
static int a;
---------------------------------------------------------------
In linkage list file
V.8.00.08 or earlier: _a
V.9.00.00 or later: __$a
|
| (2) |
Symbol names outputted when a source file compiled as a C++ program (Conditions 3-a and -c)
In source file 1
---------------------------------------------------------------
int f1(int a, int b)
{
return a+b;
}
---------------------------------------------------------------
In linkage list file 1
V.8.00.08 or earlier: f1(int, int)
V.9.00.00 or later: _f1__FiT1
In source file 2
---------------------------------------------------------------
int C::f1(int a, int b)
{
return a+b;
}
---------------------------------------------------------------
In linkage list file 2
V.8.00.08 or earlier: C::f1(int, int)
V.9.00.00 or later: _f1__1CFiT1
|
- Schedule of Fixing the Problem
We plan to fix this problem in the release of the optimizing linkage editor V.9.00.03.
In the following messages, which the linker outputs, the symbol names given have hitherto been those used in the tool for its own in all the versions of the compiler packages involved. However, the symbol names will be changed for unification to those outputted to linkage list files after the linker V.9.00.03 and later:
| L0003 (I) |
"file"-"symbol" moved to "section" by optimization |
| L0004 (I) |
"file"-"symbol" deleted by optimization |
| L1321 (W) |
Entry symbol "symbol" in "file" conflicts |
| L2401 (E) |
__near8, __near16 symbol "symbol" is outside near memory area |
| L2410 (E) |
Address value specified by map file differs from one after linkage as to "symbol" |
| L2416 (E) |
Order of functions specified by map file differs from one after linkage as to "function name" |
|
 |