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