diff options
author | John Gilmore <gnu@cygnus> | 1991-05-02 04:11:40 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-05-02 04:11:40 +0000 |
commit | fc7233808a1d88db99a5181e1ee0f6865f8f5206 (patch) | |
tree | 2f0626920d2d237a52aae12eccd0d5b8dd54ec1c /bfd/libieee.h | |
parent | ff37ea550b842cdb18aca531e5e705c03d4eed72 (diff) | |
download | binutils-gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.tar.gz |
Merge devo/bfd with GDB's bfd.
Remove obstack.h to ../include and obstack.c to ../libiberty.
Move COFF symbol swapping code to coffswap.c where GDB can call it but it
won't be duplicated if we have N different COFF targets.
Add support for traditional Unix core files (with a upage). This support
is from an Ultrix port, but is probably slightly broken now.
Improve bfd_release's of obstack'd items on error returns.
gcc -Wall fixes.
Handle section alignment slightly better in coff, and comment where it
needs more work (on page-aligning virtual vs file addresses for DPAGED).
Use set_tdata everywhere that tdata is set, to avoid "cast to the left
of assignment" problems with some compilers.
Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h
(from bfd.h) since they are internal routines.
Remove the redundant suffix "_struct" from struct tags.
Set symbol count early in file reading, before slurping in the syms,
for GDB's use.
Diffstat (limited to 'bfd/libieee.h')
-rw-r--r-- | bfd/libieee.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/bfd/libieee.h b/bfd/libieee.h index aefc5fdbb73..8d5679dcd9f 100644 --- a/bfd/libieee.h +++ b/bfd/libieee.h @@ -3,35 +3,34 @@ typedef struct { char letter; } ieee_symbol_index_type; -typedef struct ieee_symbol_struct { +typedef struct ieee_symbol { asymbol symbol; - struct ieee_symbol_struct *next; + struct ieee_symbol *next; unsigned int index; } ieee_symbol_type; -typedef struct ieee_reloc_struct { +typedef struct ieee_reloc { arelent relent; - struct ieee_reloc_struct *next; + struct ieee_reloc *next; ieee_symbol_index_type symbol; } ieee_reloc_type; #define ieee_symbol(x) ((ieee_symbol_type *)(x)) -typedef struct ieee_per_section_struct +typedef struct ieee_per_section { asection *section; bfd_byte *data; bfd_vma offset; - struct obstack reloc_obstack; - ieee_reloc_type **reloc_tail_ptr; -bfd_vma pc; + bfd_vma pc; /* For output */ file_ptr current_pos; unsigned int current_byte; boolean initialized; + ieee_reloc_type **reloc_tail_ptr; } ieee_per_section_type; #define ieee_per_section(x) ((ieee_per_section_type *)((x)->used_by_bfd)) @@ -41,24 +40,28 @@ bfd_vma pc; typedef struct { boolean read_symbols; -boolean read_data; + boolean read_data; +unsigned char *input_p; +unsigned char *first_byte; file_ptr output_cursor; /* Map of section indexes to section ptrs */ - asection * section_table[NSECTIONS]; + asection * section_table[NSECTIONS]; ieee_address_descriptor_type ad; ieee_module_begin_type mb; ieee_w_variable_type w; unsigned int section_count; + struct obstack ieee_obstack; + unsigned int map_idx; /* List of GLOBAL EXPORT symbols */ ieee_symbol_type *external_symbols; - /* List of UNDEFINED symbols */ + /* List of UNDEFINED symbols */ ieee_symbol_type *external_reference; -/* When the symbols have been canonicalized, they are in a - * special order, we remember various bases here.. */ + /* When the symbols have been canonicalized, they are in a + * special order, we remember various bases here.. */ unsigned int external_symbol_max_index; unsigned int external_symbol_min_index; unsigned int external_symbol_count; @@ -70,7 +73,7 @@ boolean read_data; int external_reference_base_offset; -boolean symbol_table_full; + boolean symbol_table_full; } ieee_data_type; typedef struct { @@ -85,6 +88,7 @@ typedef struct { 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)->tdata)) +#define ieee_ar_data(abfd) ((ieee_ar_data_type *)((abfd)->arelt_data)) +#define ptr(abfd) (ieee_data(abfd)->input_p) |