* config.guess: Combine mips-mips-riscos cases, and use cpp to
[deliverable/binutils-gdb.git] / include / oasys.h
CommitLineData
50a52c1a 1#define OASYS_MAX_SEC_COUNT 16
a07cc613
JG
2/* **** */
3
4
5typedef struct {
50a52c1a 6 uint32_type version;
a07cc613
JG
7 char create_date[12];
8 char revision_date[12];
9 uint32_type mod_count;
10 uint32_type mod_tbl_offset;
11 uint32_type sym_tbl_size;
12 uint32_type sym_count;
13 uint32_type sym_tbl_offset;
14 uint32_type xref_count;
15 uint32_type xref_lst_offset;
16} oasys_archive_header_type;
17
a8f3d651
SC
18typedef struct {
19 char version[4];
20 char create_date[12];
21 char revision_date[12];
22 char mod_count[4];
23 char mod_tbl_offset[4];
24 char sym_tbl_size[4];
25 char sym_count[4];
26 char sym_tbl_offset[4];
27 char xref_count[4];
28 char xref_lst_offset[4];
29} oasys_external_archive_header_type;
30
a07cc613
JG
31typedef struct {
32 int32_type mod_number;
33 char mod_date[12];
34 int32_type mod_size;
35 int32_type dep_count;
36 int32_type depee_count;
a07cc613 37 int32_type file_offset;
50a52c1a
SC
38 int32_type sect_count;
39 char *module_name;
40
a07cc613
JG
41} oasys_module_table_type;
42
43
a8f3d651
SC
44typedef struct {
45 char mod_number[4];
46 char mod_date[12];
47 char mod_size[4];
48 char dep_count[4];
49 char depee_count[4];
50 char sect_count[4];
51 char file_offset[4];
50a52c1a 52 char mod_name[32];
a8f3d651
SC
53} oasys_external_module_table_type;
54
55
50a52c1a 56
a07cc613
JG
57typedef enum {
58 oasys_record_is_end_enum = 0,
59 oasys_record_is_data_enum = 1,
60 oasys_record_is_symbol_enum = 2,
61 oasys_record_is_header_enum = 3,
62 oasys_record_is_named_section_enum = 4,
63 oasys_record_is_com_enum = 5,
64 oasys_record_is_debug_enum = 6,
65 oasys_record_is_section_enum = 7,
66 oasys_record_is_debug_file_enum = 8,
67 oasys_record_is_module_enum = 9,
68 oasys_record_is_local_enum = 10
69} oasys_record_enum_type;
70
71
72
73typedef struct {
74 uint8_type length;
75 int8_type check_sum;
76 int8_type type;
77 int8_type fill;
78} oasys_record_header_type;
79
80typedef struct {
81 oasys_record_header_type header;
82 uint8e_type relb;
83 uint8e_type addr[4];
84 uint8e_type data[256];
85} oasys_data_record_type;
86
87typedef struct {
88 oasys_record_header_type header;
89 int8_type version_number;
90 int8_type rev_number;
91 char module_name[26-6];
92 char description[64-26];
93} oasys_header_record_type;
94
95#define OASYS_VERSION_NUMBER 0
96#define OASYS_REV_NUMBER 0
97typedef struct {
98 oasys_record_header_type header;
99 int8e_type relb;
100 int8e_type value[4];
101 int8e_type refno[2];
102 char name[64];
103} oasys_symbol_record_type;
104
105typedef int8e_type relocation_byte;
106
107#define RELOCATION_PCREL_BIT 0x80
108#define RELOCATION_32BIT_BIT 0x40
109#define RELOCATION_TYPE_BITS 0x30
110#define RELOCATION_TYPE_ABS 0x00
111#define RELOCATION_TYPE_REL 0x10
112#define RELOCATION_TYPE_UND 0x20
113#define RELOCATION_TYPE_COM 0x30
114#define RELOCATION_SECT_BITS 0x0f
115
116typedef struct
117{
118 oasys_record_header_type header;
119 uint8e_type relb;
120 int8_type value[4];
121 int8_type vma[4];
122 int8_type fill[3];
123} oasys_section_record_type;
124
125typedef struct {
126 oasys_record_header_type header;
127 uint8e_type relb;
128 int8e_type entry[4];
129 int8e_type fill[2];
130 int8e_type zero;
131} oasys_end_record_type;
132
133
50a52c1a 134
a07cc613
JG
135typedef union
136{
137 oasys_record_header_type header;
138 oasys_data_record_type data;
139 oasys_section_record_type section;
140 oasys_symbol_record_type symbol;
141 oasys_header_record_type first;
142 oasys_end_record_type end;
143 uint8e_type pad[256];
144} oasys_record_union_type;
This page took 0.208827 seconds and 4 git commands to generate.