Chapter Contents

Previous

Next
Extended Names

Extended Names Processing

The extname compiler option specifies that the compiler encode extended names in eight-character, uppercase external symbols and save the original extended names in generated object code. When the COOL utility processes object modules that contain extended names, it uses the saved extended names to create external symbols that allow the linker to link object files correctly. If extname is not specified, the compiler creates external symbols for extended names by converting and truncating each name to a maximum of eight uppercase characters.

The extname option directs the compiler to allow all identifiers, whether internal or external, to be up to 65,535 characters in length. The compiler refers to internal identifiers by their full names. During object code generation, the compiler examines the identifier of each extern variable and each extern or static function and determines if the identifier meets one or both of the following criteria:

A name is an extended name if either of these conditions is true, and it is not the name of a function declared with the _ _asm , _ _ref , or _ _ibmos keyword or one of the high-level language keywords, such as _ _pascal .

Note that all function names, either static or extern , may be considered extended names. Even though the name of a static function is not visible externally, the extended function name is retained for use in commands to the debugger.

If the name is an extended name, the compiler assigns to it an eight-character external symbol that represents it in object code. A unique extended name is always assigned the same symbol, no matter how often it occurs within a compilation. The external symbol is in the following form:

@@nnnnnn

where nnnnnn is a decimal number. The COOL utility uses this number to find the extended name associated with the external symbol.

When the extname option is in effect, the compiler is sensitive to case with regard to the special function names main and _dynamn . In other words, a program can have both a main and a MAIN function. The compiler will treat only the main function as the main entry point. When the noextname option is specified, the compiler is case insensitive with regard to the special function names main and _dynamn . That is, the compile r will accept MAIN as the main entry point and _DYNAMN as the dynamically loaded entry point.

When the norent compiler option is specified, the compiler may also create external symbols in the form of &@nnnnnn . These symbols represent a pointer to a function with an extended name.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.