HP-UX Reference (11i v2 03/08) - 4 File Formats (vol 8)
a
a.out(4) a.out(4)
R_LTP_OVERRIDE
220 1 none
R_COMMENT 221 6 OP=B1;V=B2toB6
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
general 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
eliminating 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 contribu-
tion 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 file. 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 */
};
FILES
<a.out.h>
<aouthdr.h>
<compunit.h>
<elf.h>
<filehdr.h>
<reloc.h>
<scnhdr.h>
<spacehdr.h>
<syms.h>
SEE ALSO
System Tools
as(1) Translate assembly code to machine code
cc(1) Invoke the HP-UX C compiler
ld(1) Invoke the link editor
Miscellaneous
crt0(3) Execution startup routine
elf(3E) For the ELF a.out only
end(3C) Symbol of the last locations in program
magic(4) Magic number for HP-UX implementations
nm(1) Print name list of object file
strip(1) Strip symbol and line number information from an object file
HP-UX 11i Version 2: August 2003 − 14 − Hewlett-Packard Company Section 4−−15