.globl pseudo-op

Purpose

Declares a symbol to be a global symbol.

Syntax

Item Description
.globl Name [, Visibility ]

Description

The .globl pseudo-op indicates that the symbol name is a global symbol and can be referenced by other files during linking. The .extern, .weak, or .comm pseudo-op can also be used to make a global symbol.

The visibility of the global symbol can be specified with the Visibility parameter.

Parameters

Item Description
Name Specifies the name of the label or symbol to be declared global. Name can be a Qualname. (A Qualname specifies a Name and StorageMappingClass for the control section.)
Visibility Specifies the visibility of the symbol. Valid visibility values are exported, hidden, internal, and protected. Symbol visibilities are used by the linker.

Examples

The following example illustrates the use of the .globl pseudo-op:


   .globl main
main:
   .csect data[rw]
   .globl data[rw], protected

# data[RW] is a global symbol and is to be exported with
# protected visibility at link time.