Initial revision
[external/binutils.git] / bfd / libieee.h
1 typedef struct {
2   unsigned int index:24;
3   char letter;
4 } ieee_symbol_index_type;
5
6 typedef struct ieee_symbol_struct {
7   asymbol symbol;
8   struct ieee_symbol_struct *next;
9
10 unsigned int index;
11 } ieee_symbol_type;
12
13
14 typedef struct ieee_reloc_struct {
15   arelent relent;
16   struct ieee_reloc_struct *next;
17   ieee_symbol_index_type symbol;
18
19 } ieee_reloc_type;
20
21 #define ieee_symbol(x) ((ieee_symbol_type *)(x))
22
23 typedef struct ieee_per_section_struct
24 {
25   asection *section;
26   bfd_byte *data;
27   bfd_vma offset;
28   struct  obstack reloc_obstack;
29   ieee_reloc_type **reloc_tail_ptr;
30 bfd_vma pc;
31   /* For output */
32   file_ptr current_pos;
33   unsigned int current_byte;
34   boolean initialized;
35 } ieee_per_section_type;
36
37 #define ieee_per_section(x) ((ieee_per_section_type *)((x)->used_by_bfd))
38 #define NSECTIONS 10
39
40   
41
42 typedef struct {
43   boolean read_symbols;
44 boolean read_data;
45   file_ptr output_cursor;
46   /* Map of section indexes to section ptrs */
47  asection * section_table[NSECTIONS];
48   ieee_address_descriptor_type ad;
49   ieee_module_begin_type mb;
50   ieee_w_variable_type w;
51
52   unsigned int section_count;
53
54   unsigned int map_idx;
55   /* List of GLOBAL EXPORT symbols */
56   ieee_symbol_type *external_symbols;
57  /* List of UNDEFINED symbols */
58   ieee_symbol_type *external_reference;
59
60 /* When the symbols have been canonicalized, they are in a
61  * special order, we remember various bases here.. */
62   unsigned int external_symbol_max_index;
63   unsigned int external_symbol_min_index;
64   unsigned int external_symbol_count;
65   int external_symbol_base_offset;
66
67   unsigned int external_reference_max_index;
68   unsigned int external_reference_min_index;
69   unsigned int external_reference_count;
70   int external_reference_base_offset;
71
72
73 boolean symbol_table_full;
74 } ieee_data_type;
75
76 typedef struct {
77   file_ptr file_offset;
78   bfd *abfd;
79 } ieee_ar_obstack_type;
80
81 typedef struct {
82   ieee_ar_obstack_type *elements;
83   struct  obstack element_obstack;
84   unsigned  int element_index ;
85   unsigned int element_count;
86 } ieee_ar_data_type;
87 #define ieee_data(abfd) ((ieee_data_type *)((abfd)->tdata))
88 #define ieee_ar_data(abfd) ((ieee_ar_data_type *)((abfd)->tdata))
89
90