[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Assembler Language Reference
.globl Pseudo-op
Purpose
Makes a symbol globally visible to the linker.
Syntax
Description
The .globl pseudo-op makes the
symbol Name globally visible to the linker and available
to any file that is linked to the file in which the .globl pseudo-op occurs.
- If the .globl pseudo-op is
not used for a symbol, then that symbol is, unless otherwise effected, only
visible within the current assembly and not to other modules that may later
be linked to the current assembly. Alternately, the .extern or .weak pseudo-op can be used to effect visibility.
- If Name is defined in the
current assembly, its type and value arise from that definition, not the .globl definition.
- The binder maps all common segments with the same
name into the same memory. If the name is declared .globl and defined in one of the segments, this has the same effect as declaring
the common symbols to be .globl in all segments. In
this way, common memory can be initialized.
Parameters
Name |
Represents any label or symbol that is defined locally and requires
external visibility. This parameter can be a Qualname.
(A Qualname specifies a Name and StorageMappingClass for the control section.) |
Examples
The following example illustrates the use of the .globl pseudo-op:
.globl main
main:
.csect data[rw]
.globl data[rw]
Related Information
Pseudo-ops Overview.
The .comm pseudo-op, .extern pseudo-op,
and the .weak pseudo-op.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]