1 /*** coff information for HP/Intel IA-64. */
4 /********************** FILE HEADER **********************/
6 struct external_filehdr
{
7 char f_magic
[2]; /* magic number */
8 char f_nscns
[2]; /* number of sections */
9 char f_timdat
[4]; /* time & date stamp */
10 char f_symptr
[4]; /* file pointer to symtab */
11 char f_nsyms
[4]; /* number of symtab entries */
12 char f_opthdr
[2]; /* sizeof(optional hdr) */
13 char f_flags
[2]; /* flags */
16 #define IA64MAGIC 0x200
18 #define IA64BADMAG(x) (((x).f_magic != IA64MAGIC))
21 * F_RELFLG relocation info stripped from file
22 * F_EXEC file is executable (no unresolved external references)
23 * F_LNNO line numbers stripped from file
24 * F_LSYMS local symbols stripped from file
25 * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
28 #define F_RELFLG (0x0001)
29 #define F_EXEC (0x0002)
30 #define F_LNNO (0x0004)
31 #define F_LSYMS (0x0008)
34 #define FILHDR struct external_filehdr
38 /********************** AOUT "OPTIONAL HEADER" **********************/
43 char magic
[2]; /* type of file */
44 char vstamp
[2]; /* version stamp */
45 char tsize
[4]; /* text size in bytes, padded to FW bdry*/
46 char dsize
[4]; /* initialized data " " */
47 char bsize
[4]; /* uninitialized data " " */
48 char entry
[4]; /* entry pt. */
49 char text_start
[4]; /* base of text used for this file */
51 char data_start
[4]; /* base of data used for this file */
56 #define PE32MAGIC 0x10b /* 32-bit image */
57 #define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */
59 #define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
64 #define OMAGIC 0404 /* object files, eg as output */
65 #define ZMAGIC 0413 /* demand load format, eg normal ld output */
66 #define STMAGIC 0401 /* target shlib */
67 #define SHMAGIC 0443 /* host shlib */
70 /* define some NT default values */
71 /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
72 #define NT_SECTION_ALIGNMENT 0x1000
73 #define NT_FILE_ALIGNMENT 0x200
74 #define NT_DEF_RESERVE 0x100000
75 #define NT_DEF_COMMIT 0x1000
77 /********************** SECTION HEADER **********************/
80 struct external_scnhdr
{
81 char s_name
[8]; /* section name */
82 char s_paddr
[4]; /* physical address, aliased s_nlib */
83 char s_vaddr
[4]; /* virtual address */
84 char s_size
[4]; /* section size */
85 char s_scnptr
[4]; /* file ptr to raw data for section */
86 char s_relptr
[4]; /* file ptr to relocation */
87 char s_lnnoptr
[4]; /* file ptr to line numbers */
88 char s_nreloc
[2]; /* number of relocation entries */
89 char s_nlnno
[2]; /* number of line number entries*/
90 char s_flags
[4]; /* flags */
93 #define SCNHDR struct external_scnhdr
97 * names of "special" sections
100 #define _DATA ".data"
102 #define _COMMENT ".comment"
105 /********************** LINE NUMBERS **********************/
107 /* 1 line number entry for every "breakpointable" source line in a section.
108 * Line numbers are grouped on a per function basis; first entry in a function
109 * grouping will have l_lnno = 0 and in place of physical address will be the
110 * symbol table index of the function name.
112 struct external_lineno
{
114 char l_symndx
[4]; /* function name symbol index, iff l_lnno == 0*/
115 char l_paddr
[4]; /* (physical) address of line number */
117 char l_lnno
[2]; /* line number */
121 #define LINENO struct external_lineno
125 /********************** SYMBOLS **********************/
127 #define E_SYMNMLEN 8 /* # characters in a symbol name */
128 #define E_FILNMLEN 14 /* # characters in a file name */
129 #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
131 struct external_syment
134 char e_name
[E_SYMNMLEN
];
147 #define N_BTMASK (0xf)
148 #define N_TMASK (0x30)
152 union external_auxent
{
154 char x_tagndx
[4]; /* str, un, or enum tag indx */
157 char x_lnno
[2]; /* declaration line number */
158 char x_size
[2]; /* str/union/array size */
160 char x_fsize
[4]; /* size of function */
163 struct { /* if ISFCN, tag, or .bb */
164 char x_lnnoptr
[4]; /* ptr to fcn line # */
165 char x_endndx
[4]; /* entry ndx past block end */
167 struct { /* if ISARY, up to 4 dimen. */
168 char x_dimen
[E_DIMNUM
][2];
171 char x_tvndx
[2]; /* tv index */
175 char x_fname
[E_FILNMLEN
];
183 char x_scnlen
[4]; /* section length */
184 char x_nreloc
[2]; /* # relocation entries */
185 char x_nlinno
[2]; /* # line numbers */
186 char x_checksum
[4]; /* section COMDAT checksum */
187 char x_associated
[2]; /* COMDAT associated section index */
188 char x_comdat
[1]; /* COMDAT selection number */
192 char x_tvfill
[4]; /* tv fill value */
193 char x_tvlen
[2]; /* length of .tv */
194 char x_tvran
[2][2]; /* tv range */
195 } x_tv
; /* info about .tv section (in auxent of symbol .tv)) */
200 #define SYMENT struct external_syment
202 #define AUXENT union external_auxent
206 # define _ETEXT "etext"
209 /********************** RELOCATION DIRECTIVES **********************/
213 struct external_reloc
{
220 #define RELOC struct external_reloc
This page took 0.035694 seconds and 5 git commands to generate.