[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

.extern Pseudo-op

Purpose

Identifies a symbol defined in another source module.

Syntax

.extern Name

Description

The .extern instruction identifies the Name value as a symbol defined in another source module, and Name becomes an external symbol. Any external symbols used in the current assembly that are not defined in the current assembly must be declared with an .extern statement. A locally defined symbol that appears in an .extern statement is equivalent to using that symbol in a .globl statement. A symbol not locally defined that appears in a .globl statement is equivalent to using that symbol in an .extern statement. An undefined symbol is flagged as an error unless the -u flag of the as command is used.

Parameters

Name Specifies an operand that is an external symbol and that can be a Qualname. (A Qualname parameter specifies the Name and StorageMappingClass values for the control section.)

Examples

The following example demonstrates the use of the .extern pseudo-op:

   .extern proga[PR]
   .toc
T.proga:   .tc proga[TC],proga[PR]

Related Information

Pseudo-ops Overview.

The .csect pseudo-op, .globl pseudo-op.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]