[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

.rename Pseudo-op


Creates a synonym or alias for an illegal or undesirable name.


.rename Name,StringConstant


The restrictions on the characters that can be used for symbols within an assembler source file are defined in "Constructing Symbols". The symbol cannot contain any blanks or special characters, and cannot begin with a digit.

For any external symbol that must contain special characters, the .rename pseudo-op provides a way to do so.

The .rename pseudo-op changes the Name parameter to the StringConstant value for all external references at the end of assembly. Internal references to the local assembly are made to Name. The externally visible Name is StringConstant. The .rename pseudo-op is useful in referencing symbol names that are otherwise illegal in the assembler syntax.


Name Represents a symbol. To be externally visible, the Name parameter must appear in an .extern or .globl statement.
StringConstant Represents the value to which the Name parameter is changed at end of assembly.


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

        .csect mst_sect[RW]
        .globl mst_sect[RW]
        .globl OK_chars
        .long OK_chars
        .rename OK_chars,"$_SPECIAL_$_char"
        .rename mst_sect[RW],"MST_sect_renamed"

Related Information

Pseudo-ops Overview.

Constructing Symbols.

The .extern pseudo-op, .globl pseudo-op.

[ Previous | Next | Contents | Home | Search ]