Everything

.WEAK [V1.11 or later]


Declares to the optimizing linker that the symbol described in the operand field is a symbol to be referenced from another module

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.WEAK
symbol-name
[; comment]

[Function]

-

The .WEAK directive declares to the optimizing linker that the symbol described in the operand field is a symbol to be referenced from another module.

[Description]

-

The .WEAK directive declares to the optimizing linker that the symbol described in the operand field is a symbol to be referenced from another module.

-

The differences between the .WEAK directive and the .PUBLIC directive are as follows:

-

If symbols with the same name exist in different modules, specifying the .PUBLIC directive for each of these symbols will cause an error during linking.

-

If symbols with the same name exist in different modules, specifying the .PUBLIC directive for one of these symbols and specifying the .WEAK directive for others does not cause an error. In this case, the module specified by the .PUBLIC directive will be linked.

-

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

-

The following cannot be written as an operand:

(a)

Symbol defined with the .SET directive

(b)

Section name

(c)

Macro name