00001 /* IEEE-695 object file formats: definitions internal to BFD. 00002 Copyright 1990, 1991, 1992, 1994, 1996, 2001, 2002 00003 Free Software Foundation, Inc. 00004 Written by Cygnus Support. Mostly Steve Chamberlain's fault. 00005 00006 This file is part of BFD, the Binary File Descriptor library. 00007 00008 This program is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00021 00022 typedef struct { 00023 unsigned int index:24; 00024 char letter; 00025 } ieee_symbol_index_type; 00026 00027 typedef struct ct { 00028 bfd *this; 00029 struct ct *next; 00030 } bfd_chain_type; 00031 00032 typedef struct ieee_symbol 00033 { 00034 asymbol symbol; 00035 struct ieee_symbol *next; 00036 00037 unsigned int index; 00038 } ieee_symbol_type; 00039 00040 00041 typedef struct ieee_reloc { 00042 arelent relent; 00043 struct ieee_reloc *next; 00044 ieee_symbol_index_type symbol; 00045 00046 } ieee_reloc_type; 00047 00048 #define ieee_symbol(x) ((ieee_symbol_type *)(x)) 00049 00050 typedef struct ieee_per_section 00051 { 00052 asection *section; 00053 bfd_byte *data; 00054 bfd_vma offset; 00055 bfd_vma pc; 00056 /* For output */ 00057 file_ptr current_pos; 00058 unsigned int current_byte; 00059 bfd_boolean initialized; 00060 ieee_reloc_type **reloc_tail_ptr; 00061 } ieee_per_section_type; 00062 00063 #define ieee_per_section(x) ((ieee_per_section_type *)((x)->used_by_bfd)) 00064 00065 typedef struct { 00066 unsigned char *input_p; 00067 unsigned char *first_byte; 00068 unsigned char *last_byte; 00069 bfd *abfd; 00070 } common_header_type ; 00071 00072 typedef struct ieee_data_struct 00073 { 00074 common_header_type h; 00075 bfd_boolean read_symbols; 00076 bfd_boolean read_data; 00077 file_ptr output_cursor; 00078 /* Map of section indexes to section ptrs */ 00079 asection **section_table; 00080 unsigned int section_table_size; 00081 ieee_address_descriptor_type ad; 00082 ieee_module_begin_type mb; 00083 ieee_w_variable_type w; 00084 00085 unsigned int section_count; 00086 00087 unsigned int map_idx; 00088 /* List of GLOBAL EXPORT symbols */ 00089 ieee_symbol_type *external_symbols; 00090 /* List of UNDEFINED symbols */ 00091 ieee_symbol_type *external_reference; 00092 00093 /* When the symbols have been canonicalized, they are in a 00094 * special order, we remember various bases here.. */ 00095 unsigned int external_symbol_max_index; 00096 unsigned int external_symbol_min_index; 00097 unsigned int external_symbol_count; 00098 int external_symbol_base_offset; 00099 00100 unsigned int external_reference_max_index; 00101 unsigned int external_reference_min_index; 00102 unsigned int external_reference_count; 00103 int external_reference_base_offset; 00104 00105 00106 bfd_boolean symbol_table_full; 00107 00108 00109 bfd_boolean done_debug; 00110 00111 00112 bfd_chain_type *chain_head; 00113 bfd_chain_type *chain_root; 00114 00115 } ieee_data_type; 00116 00117 typedef struct { 00118 file_ptr file_offset; 00119 bfd *abfd; 00120 } ieee_ar_obstack_type; 00121 00122 typedef struct ieee_ar_data_struct 00123 { 00124 common_header_type h; 00125 ieee_ar_obstack_type *elements; 00126 00127 unsigned int element_index ; 00128 unsigned int element_count; 00129 00130 } ieee_ar_data_type; 00131 00132 #define IEEE_DATA(abfd) ((abfd)->tdata.ieee_data) 00133 #define IEEE_AR_DATA(abfd) ((abfd)->tdata.ieee_ar_data) 00134 00135 #define ptr(abfd) (ieee_data(abfd)->input_p)
1.5.6