 |
|
 |
RENESAS TOOL NEWS on November 16, 2003: RSO-M3T-NC308WA_1-031116D
A Note on Using C compilers
M3T-NC308WA, M3T-NC30WA, and M3T-NC79WA;
and Assemblers AS308, AS30, and AS79
--On Linking Relocatable Files--
|
Please take note of the following problem in using the M3T-NC308WA, M3T-NC30WA, and M3T-NC79WA C compilers (with an assembler and integrated development environment) and the AS308, AS30, and AS79 assemblers:
- On linking relocatable module files with no sections
- Products and Versions Concerned
- * C compilers:
- M3T-NC308WA V.1.00 Release 1 through V.5.10 Release 1
for the M32C/80, and M16C/80 series
- M3T-NC30WA V.2.00 Release 1 through V.5.20 Release 1
for the M16C/60, M16C/30, M16C/Tiny, M16C/20, M16C/10, and R8C/Tiny series
- M3T-NC79WA V.2.00 Release 1 through V.4.10 Release 1
for the 79xx series
- * Relocatable Assemblers
- AS308 V.1.00 Release 1 and V.2.00 Release 1
for the M32C/80 and M16C/80 series
- AS30 V.1.00 Release 1 through V.3.20 Release 1
for the M16C/60, M16C/30, M16C/20, and M16C/10 series
- AS79 V.1.00 Release 1 through V.3.20 Release 1
for the 79xx series
- Description
Successively linking relocatable module files with no sections may end in failure with an error message "value is undefined" or "Illegal format" displayed.
- 2.1 Conditions
- This problem occurs if the following three conditions are satisfied:
| (1) | Sixty-five or more relocatable files exist in the program. |
| (2) | Thirty two or more relocatable files with no sections (for example, those containing only the declarations of external variable and functions) are linked at the thirty-third and later in linking order. |
| (3) | Relocatable files with sections are linked after the files in (2) above. |
- 2.2 Example
>ln308 @cmdfile
Linking Order .r30 file
---------------------------------
1 file1.r30
........................
32 file32.r30
---------------------------------
33 file33.r30 32 relocatable files with no sections
.........................
64 file64.r30
---------------------------------
65 file65.r30
---------------------------------
- Workaround
This problem can be circumvented in either of the following ways:
| (1) | Change the linking order so that 32 or more relocatable files with no sections cannot be in series. |
| (2) | Create and add relocatable files with zero-size sections for the same purpose as in (1). |
Examples of source files with zero-size sections
* In C language
empty.c
----------------------------------------
#pragma ASM
.section empty
#pragma ENDASM
----------------------------------------
* In assembly language
empty.a30
----------------------------------------
.section empty
.end
----------------------------------------
Modified example
Linking Order .r30 file
---------------------------------
1 file1.r30
........................
32 file32.r30
---------------------------------
33 file33.r30
34 empty.r30 Create this relocatable file with
......................... zero-size sections and place it at
......................... the 34th line.
64 file63.r30
---------------------------------
65 file64.r30
66 file65.r30
---------------------------------
- Schedule of Fixing the Problem
We plan to fix this problem in our next release of the products.
|
 |