1 /* IBM RS/6000 "XCOFF" file definitions for BFD.
2 Copyright 1990, 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
3 FIXME: Can someone provide a transliteration of this name into ASCII?
4 Using the following chars caused a compiler warning on HIUX (so I replaced
5 them with octal escapes), and isn't useful without an understanding of what
7 Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
8 and John Gilmore of Cygnus Support. */
10 #define DO_NOT_DEFINE_AOUTHDR
11 #define DO_NOT_DEFINE_AUXENT
13 #include "coff/external.h"
16 #define U802WRMAGIC 0730 /* writeable text segments **chh** */
17 #define U802ROMAGIC 0735 /* readonly sharable text segments */
18 #define U802TOCMAGIC 0737 /* readonly text segments and TOC */
21 ((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
22 (x).f_magic != U802TOCMAGIC)
24 /********************** AOUT "OPTIONAL HEADER" **********************/
28 unsigned char magic
[2]; /* type of file */
29 unsigned char vstamp
[2]; /* version stamp */
30 unsigned char tsize
[4]; /* text size in bytes, padded to FW bdry */
31 unsigned char dsize
[4]; /* initialized data " " */
32 unsigned char bsize
[4]; /* uninitialized data " " */
33 unsigned char entry
[4]; /* entry pt. */
34 unsigned char text_start
[4]; /* base of text used for this file */
35 unsigned char data_start
[4]; /* base of data used for this file */
36 unsigned char o_toc
[4]; /* address of TOC */
37 unsigned char o_snentry
[2]; /* section number of entry point */
38 unsigned char o_sntext
[2]; /* section number of .text section */
39 unsigned char o_sndata
[2]; /* section number of .data section */
40 unsigned char o_sntoc
[2]; /* section number of TOC */
41 unsigned char o_snloader
[2]; /* section number of .loader section */
42 unsigned char o_snbss
[2]; /* section number of .bss section */
43 unsigned char o_algntext
[2]; /* .text alignment */
44 unsigned char o_algndata
[2]; /* .data alignment */
45 unsigned char o_modtype
[2]; /* module type (??) */
46 unsigned char o_cputype
[2]; /* cpu type */
47 unsigned char o_maxstack
[4]; /* max stack size (??) */
48 unsigned char o_maxdata
[4]; /* max data size (??) */
49 unsigned char o_resv2
[12]; /* reserved */
54 #define SMALL_AOUTSZ (28)
57 #define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
58 #define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
59 #define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
61 /* More names of "special" sections. */
63 #define _LOADER ".loader"
65 /* XCOFF uses a special .loader section with type STYP_LOADER. */
66 #define STYP_LOADER 0x1000
68 /* XCOFF uses a special .debug section with type STYP_DEBUG. */
69 #define STYP_DEBUG 0x2000
71 /* XCOFF handles line number or relocation overflow by creating
72 another section header with STYP_OVRFLO set. */
73 #define STYP_OVRFLO 0x8000
79 char x_tagndx
[4]; /* str, un, or enum tag indx */
85 char x_lnno
[2]; /* declaration line number */
86 char x_size
[2]; /* str/union/array size */
89 char x_fsize
[4]; /* size of function */
95 struct /* if ISFCN, tag, or .bb */
97 char x_lnnoptr
[4]; /* ptr to fcn line # */
98 char x_endndx
[4]; /* entry ndx past block end */
101 struct /* if ISARY, up to 4 dimen. */
103 char x_dimen
[E_DIMNUM
][2];
108 char x_tvndx
[2]; /* tv index */
114 char x_fname
[E_FILNMLEN
];
126 char x_scnlen
[4]; /* section length */
127 char x_nreloc
[2]; /* # relocation entries */
128 char x_nlinno
[2]; /* # line numbers */
133 char x_tvfill
[4]; /* tv fill value */
134 char x_tvlen
[2]; /* length of .tv */
135 char x_tvran
[2][2]; /* tv range */
136 } x_tv
; /* info about .tv section (in auxent of symbol .tv)) */
140 unsigned char x_scnlen
[4];
141 unsigned char x_parmhash
[4];
142 unsigned char x_snhash
[2];
143 unsigned char x_smtyp
[1];
144 unsigned char x_smclas
[1];
145 unsigned char x_stab
[4];
146 unsigned char x_snstab
[2];
150 #define AUXENT union external_auxent
153 #define DBXMASK 0x80 /* for dbx storage mask */
154 #define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
156 /********************** RELOCATION DIRECTIVES **********************/
158 struct external_reloc
166 #define RELOC struct external_reloc
169 #define DEFAULT_DATA_SECTION_ALIGNMENT 4
170 #define DEFAULT_BSS_SECTION_ALIGNMENT 4
171 #define DEFAULT_TEXT_SECTION_ALIGNMENT 4
172 /* For new sections we havn't heard of before */
173 #define DEFAULT_SECTION_ALIGNMENT 4
This page took 0.041635 seconds and 4 git commands to generate.