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