HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
a
a.out(4) a.out(4)
If a relocatable file is compiled with parameter type checking, extension records follow symbols that define
and reference procedure entry points and global variables. The first extension record, the symbol exten-
sion record, defines the type of the return value or global variable, and (if a procedure or function) the
number of parameters and the types of the first three parameters. If more parameter type descriptors are
needed, one or more argument extension records follow, each containing four more descriptors. A check
level of 0 specifies no type checking; no extension records follow. A check level of 1 or more specifies check-
ing of the return value or global variable type. A check level of 2 or more specifies checking of the number
of parameters, and a check level of 3 specifies checking the types of each individual parameter. The linker
performs the requested level of type checking between unsatisfied symbols and local or universal symbols
as it resolves symbol references.
union arg_descriptor {
struct {
unsigned int reserved: 3; /* reserved */
unsigned int packing: 1; /* packing algorithm used */
unsigned int alignment: 4; /* byte alignment */
unsigned int mode: 4; /* type of descriptor and its use */
unsigned int structure: 4; /* structure of symbol */
unsigned int hash: 1; /* set if arg_type is hashed */
int arg_type: 15; /* data type */
} arg_desc;
unsigned int word;
};
struct symbol_extension_record {
unsigned int type: 8; /* always ST_SYM_EXT */
unsigned int max_num_args: 8; /* max # of parameters */
unsigned int min_num_args: 8; /* min # of parameters */
unsigned int num_args: 8; /* actual # of parameters */
union arg_descriptor symbol_desc; /* symbol type desc. */
union arg_descriptor argument_desc[3]; /* first 3 parameters */
};
struct argument_desc_array {
unsigned int type: 8; /* always ST_ARG_EXT */
unsigned int reserved: 24; /* reserved */
union arg_descriptor argument_desc[4]; /* next 4 parameters */
};
The alignment field in arg_descriptor
indicates the minimum alignment of the data, where a
value of
n represents 2ˆn byte alignment. The values for the mode, structure , and
arg_type (when
the data type is not hashed) fields in
arg_descriptor
are given in the following table.
Value
mode structure arg_type
0 any any any
1 value parm scalar void
2 reference parm array signed byte
3 value-result struct unsigned byte
4 name pointer signed short
5 variable long ptr unsigned short
6 function return C string signed long
7 procedure Pascal string unsigned long
8 long ref parm procedure signed dbl word
9 function unsigned dbl word
10 label short real
11 real
12 long real
13 short complex
14 complex
15 long complex
26 Hewlett-Packard Company − 7 − HP-UX 11i Version 3: February 2007