 |
|
 |
MESC TOOL NEWS:
MESCT-AS308-000301D
AS308, AS30, and AS79 Precautions
|
Please take note of the following problem in using assemblers AS308, AS30, and AS79:
-
Versions Concerned
- Relocatable assembler for M16C/80 series MCUs:
AS308 V.1.00 Release 1 -- V.2.00 Release 1
- Relocatable assembler for M16C/60 and M16C/20 series MCUs:
AS30 V.1.00 Release 1 -- V.3.20 Release 1
- Relocatable assembler for 7900 series MCUs:
AS79 V.1.00 Release 1 -- V.3.20 Release 1
* Assemblers included with NC308WA, NC30WA, and NC79WA are also concerned.
-
Problem
Double-defined labels may not be interpreted as errors at linking.
- 2.1 Conditions
- This problem occurs if the following three conditions are satisfied:
- (1) In a section of a file exist both of a function call and the function to be called; a subroutine call and the subroutine to be called; or a jump instruction and the label of the jump address.
- (2) In another file exists a function, subroutine, or label whose name is the same as in (1) respectively.
- (3)The functions, subroutines, or labels in (1) and (2) above are defined as global.
- 2.2 Examples
- (1) Descriptions in C language
[fa.c]
-----------------------------------------------------------------
main()
{
func();
}
func()
{
}
-----------------------------------------------------------------
[fb.c]
-----------------------------------------------------------------
func()
{
}
-----------------------------------------------------------------
* If files "fa.c" and "fb.c" are linked together, an error that
results from double-defining the "func()" function will not be
detected. In the above example the function that is called
inside "main()" of the "fa.c" file is "func()" in "fa.c".
- (2)Descriptions in assembly language
[fd.a30]
-----------------------------------------------------------------
.glb label
.section prg1
jmp label
;
label:
.end
-----------------------------------------------------------------
[fe.a30]
-----------------------------------------------------------------
.glb label
.section prg2
label:
;
.end
-----------------------------------------------------------------
* If files "fd.a30" and "fe.a30" are linked together, an error
that results from double-defining the label will not be
detected. In the above example the destination of the "jmp"
instruction is the label in "fd.a30".
-
Workaround
Please ensure there are no functions, subroutines, or labels that are defined as global and have the same name respectively in more than one file; otherwise, change the name into those different from each other (in our next release, these double definitions will be interpreted as errors).
-
Schedule of Fixing Problem
We plan to fix this problem in our next release.
|
 |