HP-UX Reference (11i v1 00/12) - 4 File Formats (vol 8)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man4/!!!intro.4
________________________________________________________________
___ ___
a
a.out(4) a.out(4)
R_D_MODE 199 1 none
R_R_MODE 200 1 none
R_DATA_OVERRIDE 201 1 V=0
202 2 V = sign_extend(B1)
203 3 V = sign_extend(B2)
204 4 V = sign_extend(B3)
205 5 V=B4
R_TRANSLATED
206 1 none
R_AUX_UNWIND 207 12 CU,SN,SK = B11 (CU is 24 bits;
SN is 32 bits; SK is 32 bits)
R_COMP1 208 2 OP = B1; V = OP & 0x3f; C = OP & 0x1f
R_COMP2
209 5 OP = B1; S = B3; L = OP & 1;
V = ((OP & 0x7f) << 24) | S
R_COMP3
210 6 OP = B1; V = B4;
R = ((OP & 1) << 8) | (V >> 16);
S=V&0xffffff
R_PREV_FIXUP
211-214 1 X=D
R_N0SEL
216 1 none
R_N1SEL 217 1 none
R_SEC_STMT 215 1 none
R_LINETAB 218 9 ES = B1; CU = B3; SM = B4
R_LINETAB_ESC
219 3 ES = B1; M = B1
R_LTP_OVERRIDE
220 1 none
R_COMMENT 221 6 OP = B1; V = B2 to B6
R_TP_OVERRIDE
222 1 none
R_RESERVED 224-255 reserved
Parameter relocation bits are encoded in the fixup requests in two ways, noted as rbits1 and rbits2 in the
above table.
The first encoding recognizes that the most common procedure calls have only general register arguments
with no holes in the parameter list. The encoding for such calls is simply the number of parameters in gen-
eral registers (0 to 4), plus 5 if there is a return value in a general register.
The second encoding is more complex. The 10 argument relocation bits are compressed into 9 bits by elim-
inating some impossible combinations. The encoding is the combination of three contributions. The first
contribution is the pair of bits for the return value, which are not modified. The second contribution is 9 if
the first two parameter words together form a double-precision parameter; otherwise, it is 3 times the pair
of bits for the first word plus the pair of bits for the second word. Similarly, the third contribution is
formed based on the third and fourth parameter words. The second contribution is multiplied by 40, the
third is multiplied by 4, then the three are added together.
Compiler Records
Compiler records are placed in relocatable files by each compiler or assembler to identify the version of the
compiler that was used to produce the le. These records are copied into the executable file by the linker,
but are strippable. The structure of a compiler record is shown below. All strings are contained in the
symbol string table.
The format of the compilation record is described by the following structure declaration from
<compunit.h> .
struct compilation_unit {
union name_pt name; /* entry name */
union name_pt language_name; /* language used */
union name_pt product_id; /* compiler ID */
union name_pt version_id; /* compiler version */
unsigned int reserved: 31; /* reserved */
unsigned int chunk_flag: 1; /* MPE-only */
struct sys_clock compile_time; /* time file was compiled */
struct sys_clock source_time; /* time file was last modified */
};
PA64 ELF a.out
The file name a.out is the default output file name from the link editor, ld(1). The link editor will make
an
a.out executable if there were no errors in linking. The output file of the assembler, as(1), also follows
Section 414 13 HP-UX Release 11i: December 2000
___
___