Assembler Directives and
.IMPORT Directive
TSPECIFIC The TSPECIFIC keyword indicates that this is a thread local storage symbol.
Discussion
The .IMPORT directive uses a series of keywords to define a symbol to the linker. These keywords declare the symbol's type. Because the
.IMPORT directive specifies that another object module contains this symbol's formal definition, the Assembler does not associate an imported symbol with any particular subspace. When an .IMPORT directive lacks a type parameter, the Assembler assigns the type of the current subspace (either $CODE$ or $DATA$) to the symbol.
Example
The .IMPORT directive lets the Assembler access symname as a recognized symbol, even though it is actually defined elsewhere. The linker resolves the difference.
.IMPORT symname,CODE | ;import symname as a CODE symbol. | |
.CODE |
| ;begin CODE subspace |
LDIL | L’symname,%r1 |
|
BLE,n | R’symname(%sr4,%r1) | ;call the procedure symname in %sr4 |
space. |
|
|
NOP |
|
|
.END |
|
|
Chapter 4 | 91 |