Chapter Contents |
Previous |
Next |
Code Generation Conventions |
During compilation, the compiler creates names for various
data objects in the compilation. In general, compiler-generated names are
based on the section name. The section name, in turn, can be specified by
the
sname
option or determined by default.
In general, compiler-generated external names are created
by appending one or more special characters to the section name. Each type
of data object has a unique special character associated with it. If the section
name is less than seven characters long, then all of the created names are
suffixed by an
@
, followed by the special character for the data
object type (unless that is a second
@
). If the section name
is exactly seven characters long, then only the special character is used
as the suffix.
Control Section Names |
The compiler creates one or more control sections (CSECTs) for a compilation. Each CSECT contains a specific type of data; for example, there is a separate CSECT for the executable code for the functions in the compilation. The number of CSECTs created varies depending on the compilation and the compiler options used. Control Section Suffixes lists the possible CSECT suffixes and compiler options that may cause the CSECT to be created.
struct Run_Time_Constants { int RESERVED1; int RESERVED2; void *RESERVED3; void *ext_names; char datetime1[16] ; char sname[8] ; time_t datetime2 void *statics; int RESERVED4; int dbg_filename_len; char dbg_fileneame[1]; };
The
ext_names
field is a pointer to the
extended function names CSECT or is
NULL
if an extended function
names CSECT does not exist. The
datetime1
field is the
compilation date and time in character format. The date and time field is
16 bytes long and is in the following format:
ddMMMyy hh:mm:ss
An example of the format of the date and time field follows:
19DEC90 12:34:56
Under OS/390, the
sname
field contains the
section name of the compilation and is terminated by a 0 byte. Under CMS,
the
sname
field contains the filename of the source file.
The filename is not terminated with a 0 byte if it is exactly eight characters
long. The
datetime2
field is the compilation date and time
in numeric
time_t
format. For more information on the type
time_t
see "Timing Functions," in Chapter 2 of
SAS/C Library Reference, Volume 2. The
statics
field is the pointer to the static data or string literal CSECT,
that is, the CSECT with a name ending in a dollar sign ($).
OMD370 disassembles the run-time constants CSECT when
the
verbose
option is specified.
The
CSECTs for extended function names and extended identifiers other than function
names are created when the
extname
option is specified. See External Variables for a detailed
discussion of the extended names CSECTs. OMD370 displays the extended names
CSECTs when the
verbose
option is specified.
When the
norent
option is used, function pointers
are defined as CSECTs. If the function name is seven or fewer characters long,
the CSECT name is created by prefixing an ampersand (
&
)
to the function name. If the function name is longer than seven characters,
the compiler generates a special name, only distantly related to the actual
name of the function, beginning with an unusual character.
Pseudoregister Names |
When the
compiler options
rent
and
rentext
are used, the compiler creates pseudoregisters to contain certain
types of external and static data (see External Variables). The names of the pseudoregisters are created
as described in the previous sections. The table below lists the possible
pseudoregister suffixes
Suffix |
---|
* |
& |
The const Type Qualifier |
If either the
rent
or
rentext
compiler option is used, defined external
and static objects that are qualified as
const
are placed in the string literal CSECT if possible. See Placement of Data
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.