1184331Srwatson/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
2184331Srwatson
3184331Srwatson   Copyright 2001 Free Software Foundation, Inc.
4184331Srwatson
5184332Srwatson   This program is free software; you can redistribute it and/or modify
6184332Srwatson   it under the terms of the GNU General Public License as published by
7184331Srwatson   the Free Software Foundation; either version 2, or (at your option)
8184331Srwatson   any later version.
9184331Srwatson
10184331Srwatson   This program is distributed in the hope that it will be useful,
11184331Srwatson   but WITHOUT ANY WARRANTY; without even the implied warranty of
12184331Srwatson   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13184331Srwatson   GNU General Public License for more details.
14184331Srwatson
15184331Srwatson   You should have received a copy of the GNU General Public License
16184331Srwatson   along with this program; if not, write to the Free Software
17184331Srwatson   Foundation, Inc., 51 Franklin Street - Fifth Floor,
18184331Srwatson   Boston, MA 02110-1301, USA.
19184331Srwatson
20184331Srwatson   Contributed by Cygnus Support.  */
21184331Srwatson
22184331Srwatson#define N_W_VARIABLES 8
23184331Srwatson#define Module_Beginning 0xe0
24184331Srwatson
25184331Srwatsontypedef struct ieee_module
26184331Srwatson  {
27184331Srwatson    char *processor;
28184331Srwatson    char *module_name;
29184331Srwatson  }
30184331Srwatsonieee_module_begin_type;
31184331Srwatson
32184331Srwatson#define Address_Descriptor 0xec
33184331Srwatsontypedef struct ieee_address
34184331Srwatson  {
35184331Srwatson    bfd_vma number_of_bits_mau;
36184331Srwatson    bfd_vma number_of_maus_in_address;
37184467Srwatson
38184331Srwatson    unsigned char byte_order;
39184331Srwatson#define IEEE_LITTLE 0xcc
40184331Srwatson#define IEEE_BIG 0xcd
41184331Srwatson  }
42184331Srwatsonieee_address_descriptor_type;
43184331Srwatson
44184331Srwatsontypedef union ieee_w_variable
45184331Srwatson  {
46184331Srwatson    file_ptr offset[N_W_VARIABLES];
47184331Srwatson
48184331Srwatson    struct
49184331Srwatson      {
50184331Srwatson	file_ptr extension_record;
51184331Srwatson	file_ptr environmental_record;
52184331Srwatson	file_ptr section_part;
53184331Srwatson	file_ptr external_part;
54184331Srwatson	file_ptr debug_information_part;
55184331Srwatson	file_ptr data_part;
56184413Strasz	file_ptr trailer_part;
57184331Srwatson	file_ptr me_record;
58184331Srwatson      }
59184331Srwatson    r;
60184331Srwatson  }
61184331Srwatsonieee_w_variable_type;
62184331Srwatson
63184331Srwatsontypedef enum ieee_record
64184331Srwatson  {
65184331Srwatson    ieee_number_start_enum = 0x00,
66184331Srwatson    ieee_number_end_enum=0x7f,
67184331Srwatson    ieee_number_repeat_start_enum = 0x80,
68184331Srwatson    ieee_number_repeat_end_enum = 0x88,
69184331Srwatson    ieee_number_repeat_4_enum = 0x84,
70184331Srwatson    ieee_number_repeat_3_enum = 0x83,
71184331Srwatson    ieee_number_repeat_2_enum = 0x82,
72184331Srwatson    ieee_number_repeat_1_enum = 0x81,
73184331Srwatson    ieee_module_beginning_enum = 0xe0,
74184331Srwatson    ieee_module_end_enum = 0xe1,
75189533Srwatson    ieee_extension_length_1_enum = 0xde,
76184331Srwatson    ieee_extension_length_2_enum = 0xdf,
77184331Srwatson    ieee_section_type_enum = 0xe6,
78184331Srwatson    ieee_section_alignment_enum = 0xe7,
79184331Srwatson    ieee_external_symbol_enum = 0xe8,
80184331Srwatson    ieee_comma = 0x90,
81184331Srwatson    ieee_external_reference_enum = 0xe9,
82184331Srwatson    ieee_set_current_section_enum = 0xe5,
83184331Srwatson    ieee_address_descriptor_enum = 0xec,
84184413Strasz    ieee_load_constant_bytes_enum = 0xed,
85184331Srwatson    ieee_load_with_relocation_enum = 0xe4,
86184331Srwatson
87184331Srwatson    ieee_variable_A_enum = 0xc1,
88184331Srwatson    ieee_variable_B_enum = 0xc2,
89184331Srwatson    ieee_variable_C_enum = 0xc3,
90184331Srwatson    ieee_variable_D_enum = 0xc4,
91184331Srwatson    ieee_variable_E_enum = 0xc5,
92184331Srwatson    ieee_variable_F_enum = 0xc6,
93184331Srwatson    ieee_variable_G_enum = 0xc7,
94184331Srwatson    ieee_variable_H_enum = 0xc8,
95184331Srwatson    ieee_variable_I_enum = 0xc9,
96184331Srwatson    ieee_variable_J_enum = 0xca,
97184331Srwatson    ieee_variable_K_enum = 0xcb,
98184331Srwatson    ieee_variable_L_enum = 0xcc,
99184331Srwatson    ieee_variable_M_enum = 0xcd,
100189533Srwatson    ieee_variable_N_enum = 0xce,
101184331Srwatson    ieee_variable_O_enum = 0xcf,
102184331Srwatson    ieee_variable_P_enum = 0xd0,
103184331Srwatson    ieee_variable_Q_enum = 0xd1,
104184331Srwatson    ieee_variable_R_enum = 0xd2,
105184331Srwatson    ieee_variable_S_enum = 0xd3,
106184331Srwatson    ieee_variable_T_enum = 0xd4,
107184331Srwatson    ieee_variable_U_enum = 0xd5,
108184331Srwatson    ieee_variable_V_enum = 0xd6,
109184331Srwatson    ieee_variable_W_enum = 0xd7,
110184331Srwatson    ieee_variable_X_enum = 0xd8,
111184331Srwatson    ieee_variable_Y_enum = 0xd9,
112184331Srwatson    ieee_variable_Z_enum = 0xda,
113184331Srwatson    ieee_function_plus_enum = 0xa5,
114184331Srwatson    ieee_function_minus_enum = 0xa6,
115184331Srwatson    ieee_function_signed_open_b_enum = 0xba,
116184331Srwatson    ieee_function_signed_close_b_enum = 0xbb,
117
118    ieee_function_unsigned_open_b_enum = 0xbc,
119    ieee_function_unsigned_close_b_enum = 0xbd,
120
121    ieee_function_either_open_b_enum = 0xbe,
122    ieee_function_either_close_b_enum = 0xbf,
123    ieee_record_seperator_enum = 0xdb,
124
125    ieee_e2_first_byte_enum = 0xe2,
126    ieee_section_size_enum = 0xe2d3,
127    ieee_physical_region_size_enum = 0xe2c1,
128    ieee_region_base_address_enum = 0xe2c2,
129    ieee_mau_size_enum = 0xe2c6,
130    ieee_m_value_enum = 0xe2cd,
131    ieee_section_base_address_enum = 0xe2cc,
132    ieee_asn_record_enum = 0xe2ce,
133    ieee_section_offset_enum = 0xe2d2,
134    ieee_value_starting_address_enum = 0xe2c7,
135    ieee_assign_value_to_variable_enum = 0xe2d7,
136    ieee_set_current_pc_enum = 0xe2d0,
137    ieee_value_record_enum = 0xe2c9,
138    ieee_nn_record = 0xf0,
139    ieee_at_record_enum = 0xf1,
140    ieee_ty_record_enum = 0xf2,
141    ieee_attribute_record_enum = 0xf1c9,
142    ieee_atn_record_enum = 0xf1ce,
143    ieee_external_reference_info_record_enum = 0xf1d8,
144    ieee_weak_external_reference_enum= 0xf4,
145    ieee_repeat_data_enum = 0xf7,
146    ieee_bb_record_enum = 0xf8,
147    ieee_be_record_enum = 0xf9
148  }
149ieee_record_enum_type;
150
151typedef struct ieee_section
152  {
153    unsigned int section_index;
154    unsigned int section_type;
155    char *       section_name;
156    unsigned int parent_section_index;
157    unsigned int sibling_section_index;
158    unsigned int context_index;
159  }
160ieee_section_type;
161
162#define IEEE_REFERENCE_BASE 11
163#define IEEE_PUBLIC_BASE 32
164#define IEEE_SECTION_NUMBER_BASE 1
165
166