Download R32C/100 Series C Compiler Package V.1.02 Assembler User`s
Transcript
R32C/100 Series C Compiler Package V.1.02 Assembler System AS100 Functions Library File Referencing Function If all of the following conditions are met, ln100 links relocatable modules entered in a library file. Condition 1 Library file reference was specified on the command line. Condition 2 After all specified relocatable module files have been allocated, some global labels remain whose values are depending determination. Precaution The ln100 editor links the entire relocatable module where necessary global labels are defined. Rules for referencing library modules The ln100 editor determines the relocatable modules to be linked in the order described below. A relocatable module that has been determined to be linked is relocated section by section. Sections are relocated in the same way as sections are relocated in a relocatable module file. 1 2 3 The ln100 first searches the global label information of relocatable modules entered in a library file. Relocatable modules are referenced in the order they are entered in the library file. The labels searched from the library file are compared with the labels whose values are pending. If any labels match, ln100 links this relocatable module in the library file to the absolute module file. After going over the relocatable modules in the library file, if there remains any global label whose value is pending (i.e., a relocatable module in the library file contains an external reference label), ln100 outputs an undefined error. Example of referencing library modules libsmp1.a30 .GLB .SECTIONprogr1 : .END sym1 ; External reference symbol libsmp.lib libsmp2.a30 sym2 .GLB .EQU .SECTIONprog2 : .END sym2 2 .GLB .GLB .EQU .SECTIONprog3 : .END sym1 sym2 1 ibsmp3.a30 sym1 Input command to link >ln100 libsmp1 -L libsmp.lib Result to link processing "libsmp1.r30" processing "libsmp.lib ( libsmp3.r30 )" processing "libsmp.lib ( libsmp2.r30 )" REJ10J2010-0200 Rev.2.00 2010.04.01 17 ; External reference symbol