Associates a hash value with an external symbol.
The hash string value contains type-checking information. It is used by the link-editor and program loader to detect variable mismatches and argument interface errors prior to the execution of a program.
Hash string values are usually generated by compilers of strongly typed languages. The hash value for a symbol can only be set once in an assembly. See Type-Check Section in the XCOFF Object (a.out) File Format for more information on type encoding and checking.
|Name||Represents a symbol. Because this should be an external symbol, Name should appear in an .extern or .global statement.|
|StringConstant|| Represents a type-checking hash string value. This parameter consists of characters that represent a hexadecimal hash code and must be in the set [0-9A-F] or [0-9a-f].
A hash string comprises the following three fields:
Note: A hash string must have a length of 10 bytes. Otherwise, a warning message is reported when the -w flag is used. Since each character is represented by two ASCII codes, the 10-byte hash character string is represented by a string of 20 hexadecimal digits.
The following example illustrates the use of the .hash pseudo-op:
.extern b[pr] .extern a[pr] .extern e[pr] .hash b[pr],"0000A9375C1F51C2DCF0" .hash a[pr],"ff0a2cc12365de30" # warning may report .hash e[pr],"00002020202051C2DCF0"
Type-Check Section in XCOFF Object (a.out) File Format.
The .extern pseudo-op, .globl pseudo-op.