b54a3fe5e93ba7c19f353ec2d6a5be95a995f767
[deliverable/binutils-gdb.git] / include / oasys.h
1
2 /* **** */
3
4
5 typedef struct {
6 int32_type version;
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
18 typedef 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
31 typedef 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;
37 int32_type sect_count;
38 int32_type file_offset;
39 int32_type mod_name_length;
40 } oasys_module_table_type;
41
42
43 typedef struct {
44 char mod_number[4];
45 char mod_date[12];
46 char mod_size[4];
47 char dep_count[4];
48 char depee_count[4];
49 char sect_count[4];
50 char file_offset[4];
51 char mod_name_length[4];
52 } oasys_external_module_table_type;
53
54
55 typedef enum {
56 oasys_record_is_end_enum = 0,
57 oasys_record_is_data_enum = 1,
58 oasys_record_is_symbol_enum = 2,
59 oasys_record_is_header_enum = 3,
60 oasys_record_is_named_section_enum = 4,
61 oasys_record_is_com_enum = 5,
62 oasys_record_is_debug_enum = 6,
63 oasys_record_is_section_enum = 7,
64 oasys_record_is_debug_file_enum = 8,
65 oasys_record_is_module_enum = 9,
66 oasys_record_is_local_enum = 10
67 } oasys_record_enum_type;
68
69
70
71 typedef struct {
72 uint8_type length;
73 int8_type check_sum;
74 int8_type type;
75 int8_type fill;
76 } oasys_record_header_type;
77
78 typedef struct {
79 oasys_record_header_type header;
80 uint8e_type relb;
81 uint8e_type addr[4];
82 uint8e_type data[256];
83 } oasys_data_record_type;
84
85 typedef struct {
86 oasys_record_header_type header;
87 int8_type version_number;
88 int8_type rev_number;
89 char module_name[26-6];
90 char description[64-26];
91 } oasys_header_record_type;
92
93 #define OASYS_VERSION_NUMBER 0
94 #define OASYS_REV_NUMBER 0
95 typedef struct {
96 oasys_record_header_type header;
97 int8e_type relb;
98 int8e_type value[4];
99 int8e_type refno[2];
100 char name[64];
101 } oasys_symbol_record_type;
102
103 typedef int8e_type relocation_byte;
104
105 #define RELOCATION_PCREL_BIT 0x80
106 #define RELOCATION_32BIT_BIT 0x40
107 #define RELOCATION_TYPE_BITS 0x30
108 #define RELOCATION_TYPE_ABS 0x00
109 #define RELOCATION_TYPE_REL 0x10
110 #define RELOCATION_TYPE_UND 0x20
111 #define RELOCATION_TYPE_COM 0x30
112 #define RELOCATION_SECT_BITS 0x0f
113
114 typedef struct
115 {
116 oasys_record_header_type header;
117 uint8e_type relb;
118 int8_type value[4];
119 int8_type vma[4];
120 int8_type fill[3];
121 } oasys_section_record_type;
122
123 typedef struct {
124 oasys_record_header_type header;
125 uint8e_type relb;
126 int8e_type entry[4];
127 int8e_type fill[2];
128 int8e_type zero;
129 } oasys_end_record_type;
130
131
132 #define OASYS_MAX_SEC_COUNT 16
133 typedef union
134 {
135 oasys_record_header_type header;
136 oasys_data_record_type data;
137 oasys_section_record_type section;
138 oasys_symbol_record_type symbol;
139 oasys_header_record_type first;
140 oasys_end_record_type end;
141 uint8e_type pad[256];
142 } oasys_record_union_type;
This page took 0.033816 seconds and 4 git commands to generate.