Everything

.extern


Declares to the optimizing linker that a symbol in another module is to be referenced in this module.

[Syntax]

Symbol field

Mnemonic field

Operand field

Comment field

[label:]
.extern
symbol-name[, absolute-expression ]
[; comment]

[Function]

-

The .extern directive declares to the optimizing linker that a symbol in another module is to be referenced in this module.

[Use]

-

To reference a symbol defined in another module, the .extern directive must be used to declare the symbol as an external definition.

[Description]

-

The symbol specified by the first operand is declared as an external symbolNote.

Note that if the second operand is specified, this specifies the size of the data indicated by the symbol. However, specifications of size are ignored (although including them has been allowed to retain compatibility with CX).

Note

This is a symbol with a GLOBAL binding class.

 

-

The function of this directive for declaring an external symbol does not differ from the function of the .public directive. Use this directive to declare a symbol without a definition in the specified file as an external symbol. Use the .public directive to declare symbols with definitions in the specified file as external symbols.

-

The .extern directive may be described anywhere in a source program.

-

The ".extern" directive can only define one symbol per line.

-

No error is output even if a symbol declared with the .extern directive is not referenced in the module.

-

The following symbols cannot be used as the first operand of the .extern directive:

(a)

Symbol defined with the .set directive

(b)

Section name

(c)

Macro name