binutils-gdb/bfd/libieee.h

95 lines
2.2 KiB
C
Raw Normal View History

1991-04-04 04:12:28 +02:00
typedef struct {
unsigned int index:24;
char letter;
} ieee_symbol_index_type;
typedef struct ieee_symbol
{
1991-04-04 04:12:28 +02:00
asymbol symbol;
struct ieee_symbol *next;
1991-04-04 04:12:28 +02:00
unsigned int index;
1991-04-04 04:12:28 +02:00
} ieee_symbol_type;
typedef struct ieee_reloc {
1991-04-04 04:12:28 +02:00
arelent relent;
struct ieee_reloc *next;
1991-04-04 04:12:28 +02:00
ieee_symbol_index_type symbol;
} ieee_reloc_type;
#define ieee_symbol(x) ((ieee_symbol_type *)(x))
typedef struct ieee_per_section
1991-04-04 04:12:28 +02:00
{
asection *section;
bfd_byte *data;
bfd_vma offset;
bfd_vma pc;
1991-04-04 04:12:28 +02:00
/* For output */
file_ptr current_pos;
unsigned int current_byte;
boolean initialized;
ieee_reloc_type **reloc_tail_ptr;
1991-04-04 04:12:28 +02:00
} ieee_per_section_type;
#define ieee_per_section(x) ((ieee_per_section_type *)((x)->used_by_bfd))
#define NSECTIONS 10
1991-05-08 21:23:35 +02:00
typedef struct
{
1991-04-04 04:12:28 +02:00
boolean read_symbols;
boolean read_data;
1991-05-08 21:23:35 +02:00
unsigned char *input_p;
unsigned char *first_byte;
1991-04-04 04:12:28 +02:00
file_ptr output_cursor;
/* Map of section indexes to section ptrs */
asection * section_table[NSECTIONS];
1991-04-04 04:12:28 +02:00
ieee_address_descriptor_type ad;
ieee_module_begin_type mb;
ieee_w_variable_type w;
1991-05-08 21:23:35 +02:00
1991-04-04 04:12:28 +02:00
unsigned int section_count;
1991-05-08 21:23:35 +02:00
1991-04-04 04:12:28 +02:00
unsigned int map_idx;
/* List of GLOBAL EXPORT symbols */
ieee_symbol_type *external_symbols;
/* List of UNDEFINED symbols */
1991-04-04 04:12:28 +02:00
ieee_symbol_type *external_reference;
1991-05-08 21:23:35 +02:00
/* When the symbols have been canonicalized, they are in a
1991-05-08 21:23:35 +02:00
* special order, we remember various bases here.. */
1991-04-04 04:12:28 +02:00
unsigned int external_symbol_max_index;
unsigned int external_symbol_min_index;
unsigned int external_symbol_count;
int external_symbol_base_offset;
1991-05-08 21:23:35 +02:00
1991-04-04 04:12:28 +02:00
unsigned int external_reference_max_index;
unsigned int external_reference_min_index;
unsigned int external_reference_count;
int external_reference_base_offset;
1991-05-08 21:23:35 +02:00
bfd *abfd;
boolean symbol_table_full;
1991-04-04 04:12:28 +02:00
} ieee_data_type;
typedef struct {
file_ptr file_offset;
bfd *abfd;
} ieee_ar_obstack_type;
typedef struct {
ieee_ar_obstack_type *elements;
struct obstack element_obstack;
unsigned int element_index ;
unsigned int element_count;
} ieee_ar_data_type;
#define ieee_data(abfd) ((ieee_data_type *)(abfd)->tdata)
#define ieee_ar_data(abfd) ((ieee_ar_data_type *)(abfd)->arelt_data)
1991-04-04 04:12:28 +02:00
#define ptr(abfd) (ieee_data(abfd)->input_p)