.weakref Directive

Syntax

.weakref name[, refname]

Description

The .weakref directive indicates that symbol name is a weak reference for the global symbol refname. If referenced at link time, the symbol name resolves to the symbol refname. Within a user module, a different symbol may preempt name. Otherwise, if name is not used, the linkage editor does not place it in the symbol table and does not issue unresolved symbol warnings for it.

The assembler treats the global symbol refname the same as a symbol declared in either a .extern or globl directive. The symbol refname may be defined in the same module as the .weakref directive or in a different module. The attached example indicates how a run-time library developer would use the .weakref directive to allow an application developer to define a function of the same name without conflicting with symbols of the same name in the libraries.