1 /* Rudimentary ECOFF support on MIPS machines.
2 This lacks symbol information, normally provided on MIPS Unix systems
3 in the files <sym.h> and <symconst.h>. */
5 /********************** FILE HEADER **********************/
7 struct external_filehdr
{
8 char f_magic
[2]; /* magic number */
9 char f_nscns
[2]; /* number of sections */
10 char f_timdat
[4]; /* time & date stamp */
11 char f_symptr
[4]; /* file pointer to symtab */
12 char f_nsyms
[4]; /* number of symtab entries */
13 char f_opthdr
[2]; /* sizeof(optional hdr) */
14 char f_flags
[2]; /* flags */
19 #define MIPS_MAGIC_1 0x0180
20 #define MIPS_MAGIC_2 0x0162
21 #define MIPS_MAGIC_3 0x0160
23 #define ECOFFBADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
24 ((x).f_magic!=MIPS_MAGIC_2) &&\
25 ((x).f_magic!=MIPS_MAGIC_3))
28 #define FILHDR struct external_filehdr
31 /********************** AOUT "OPTIONAL HEADER" **********************/
34 typedef struct external_aouthdr
36 char magic
[2]; /* type of file */
37 char vstamp
[2]; /* version stamp */
38 char tsize
[4]; /* text size in bytes, padded to FW bdry*/
39 char dsize
[4]; /* initialized data " " */
40 char bsize
[4]; /* uninitialized data " " */
41 char entry
[4]; /* entry pt. */
42 char text_start
[4]; /* base of text used for this file */
43 char data_start
[4]; /* base of data used for this file */
46 /* compute size of a header */
48 #define AOUTSZ (sizeof(AOUTHDR))
51 /********************** SECTION HEADER **********************/
53 struct external_scnhdr
{
54 char s_name
[8]; /* section name */
55 char s_paddr
[4]; /* physical address, aliased s_nlib */
56 char s_vaddr
[4]; /* virtual address */
57 char s_size
[4]; /* section size */
58 char s_scnptr
[4]; /* file ptr to raw data for section */
59 char s_relptr
[4]; /* file ptr to relocation */
60 char s_lnnoptr
[4]; /* file ptr to line numbers */
61 char s_nreloc
[2]; /* number of relocation entries */
62 char s_nlnno
[2]; /* number of line number entries*/
63 char s_flags
[4]; /* flags */
66 #define SCNHDR struct external_scnhdr
67 #define SCNHSZ sizeof(SCNHDR)
70 * names of "special" sections
76 #define DEFAULT_DATA_SECTION_ALIGNMENT 4
77 #define DEFAULT_BSS_SECTION_ALIGNMENT 4
78 #define DEFAULT_TEXT_SECTION_ALIGNMENT 16
79 /* For new sections we havn't heard of before */
80 #define DEFAULT_SECTION_ALIGNMENT 4
82 /********************** RELOCATION DIRECTIVES **********************/
84 struct external_reloc
{
92 /* Relevent values for r_type and ecoff. Would someone please document them */
94 #define RELOC struct external_reloc
This page took 0.031521 seconds and 4 git commands to generate.