Back to index

cell-binutils  2.17cvs20070401
xsym.h
Go to the documentation of this file.
00001 /* xSYM symbol-file support for BFD.
00002    Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006
00003    Free Software Foundation, Inc.
00004 
00005    This file is part of BFD, the Binary File Descriptor library.
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011 
00012    This program is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with this program; if not, write to the Free Software
00019    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00020 
00021 #include "bfd.h"
00022 #include <stdio.h>
00023 
00024 #ifndef __xSYM_H__
00025 #define __xSYM_H__
00026 
00027 #define BFD_SYM_VERSION_STR_3_1    "\013Version 3.1"
00028 #define BFD_SYM_VERSION_STR_3_2    "\013Version 3.2"
00029 #define BFD_SYM_VERSION_STR_3_3    "\013Version 3.3"
00030 #define BFD_SYM_VERSION_STR_3_4    "\013Version 3.4"
00031 #define BFD_SYM_VERSION_STR_3_5    "\013Version 3.5"
00032 #define BFD_SYM_END_OF_LIST_3_2           0xffff
00033 #define BFD_SYM_END_OF_LIST_3_4           0xffffffff
00034 #define BFD_SYM_END_OF_LIST               BFD_SYM_END_OF_LIST_3_4
00035 #define BFD_SYM_FILE_NAME_INDEX_3_2       0xfffe
00036 #define BFD_SYM_FILE_NAME_INDEX_3_4       0xfffffffe
00037 #define BFD_SYM_FILE_NAME_INDEX           BFD_SYM_FILE_NAME_INDEX_3_4
00038 #define BFD_SYM_SOURCE_FILE_CHANGE_3_2    0xfffe
00039 #define BFD_SYM_SOURCE_FILE_CHANGE_3_4    0xfffffffe
00040 #define BFD_SYM_SOURCE_FILE_CHANGE BFD_SYM_SOURCE_FILE_CHANGE_3_4
00041 #define BFD_SYM_MAXIMUM_LEGAL_INDEX_3_2 0xfffd
00042 #define BFD_SYM_MAXIMUM_LEGAL_INDEX_3_4 0xfffffffd
00043 #define BFD_SYM_MAXIMUM_LEGAL_INDEX       BFD_SYM_MAXIMUM_LEGAL_INDEX_3_4
00044 
00045 enum bfd_sym_storage_class
00046 {
00047   BFD_SYM_STORAGE_CLASS_REGISTER = 0,
00048   BFD_SYM_STORAGE_CLASS_GLOBAL = 1,
00049   BFD_SYM_STORAGE_CLASS_FRAME_RELATIVE = 2,
00050   BFD_SYM_STORAGE_CLASS_STACK_RELATIVE = 3,
00051   BFD_SYM_STORAGE_CLASS_ABSOLUTE = 4,
00052   BFD_SYM_STORAGE_CLASS_CONSTANT = 5,
00053   BFD_SYM_STORAGE_CLASS_BIGCONSTANT = 6,
00054   BFD_SYM_STORAGE_CLASS_RESOURCE = 99
00055 };
00056 typedef enum bfd_sym_storage_class bfd_sym_storage_class;
00057 
00058 enum bfd_sym_storage_kind
00059 {
00060   BFD_SYM_STORAGE_KIND_LOCAL = 0,
00061   BFD_SYM_STORAGE_KIND_VALUE = 1,
00062   BFD_SYM_STORAGE_KIND_REFERENCE = 2,
00063   BFD_SYM_STORAGE_KIND_WITH = 3
00064 };
00065 typedef enum bfd_sym_storage_kind bfd_sym_storage_kind;
00066 
00067 enum bfd_sym_version
00068 {
00069   BFD_SYM_VERSION_3_1,
00070   BFD_SYM_VERSION_3_2,
00071   BFD_SYM_VERSION_3_3,
00072   BFD_SYM_VERSION_3_4,
00073   BFD_SYM_VERSION_3_5
00074 };
00075 typedef enum bfd_sym_version bfd_sym_version;
00076 
00077 enum bfd_sym_module_kind
00078 {
00079   BFD_SYM_MODULE_KIND_NONE = 0,
00080   BFD_SYM_MODULE_KIND_PROGRAM = 1,
00081   BFD_SYM_MODULE_KIND_UNIT = 2,
00082   BFD_SYM_MODULE_KIND_PROCEDURE = 3,
00083   BFD_SYM_MODULE_KIND_FUNCTION = 4,
00084   BFD_SYM_MODULE_KIND_DATA = 5,
00085   BFD_SYM_MODULE_KIND_BLOCK = 6
00086 };
00087 typedef enum bfd_sym_module_kind bfd_sym_module_kind;
00088 
00089 enum bfd_sym_symbol_scope
00090 {
00091   BFD_SYM_SYMBOL_SCOPE_LOCAL = 0,  /* Object is seen only inside current scope.  */
00092   BFD_SYM_SYMBOL_SCOPE_GLOBAL = 1  /* Object has global scope.  */
00093 };
00094 typedef enum bfd_sym_symbol_scope bfd_sym_symbol_scope;
00095 
00096 struct bfd_sym_file_reference
00097 {
00098   unsigned long fref_frte_index; /* File reference table index.  */
00099   unsigned long fref_offset;     /* Absolute offset into source file.  */
00100 };
00101 typedef struct bfd_sym_file_reference bfd_sym_file_reference;
00102 
00103 /* NAME TABLE (NTE).  */
00104 
00105 /* RESOURCES TABLE (RTE)
00106 
00107    All code and data is *defined* to reside in a resource.  Even A5
00108    relative data is defined to reside in a dummy resource of ResType
00109    'gbld'.  Code always resides in a resource.  Because a code/data
00110    is built of many modules, when walking through a resource we must
00111    point back to the modules in the order they were defined.  This is
00112    done by requiring the entries in the Modules Entry table to be
00113    ordered by resource/resource-number and by the location in that
00114    resource.  Hence, the resource table entry points to the first
00115    module making up that resource.  All modules table entries following
00116    that first one with the same restype/resnum are contiguous and offset
00117    from that first entry.  */
00118 
00119 struct bfd_sym_resources_table_entry
00120 {
00121   unsigned char rte_res_type[4];  /* Resource Type.  */
00122   unsigned short rte_res_number;  /* Resource Number.  */
00123   unsigned long rte_nte_index;    /* Name of the resource.  */
00124   unsigned long rte_mte_first;    /* Index of first module in the resource.  */
00125   unsigned long rte_mte_last;     /* Index of the last module in the resource.      */
00126   unsigned long      rte_res_size;     /* Size of the resource.  */
00127 };
00128 typedef struct bfd_sym_resources_table_entry bfd_sym_resources_table_entry;
00129 
00130 /* MODULES TABLE (MTE)
00131 
00132    Modules table entries are ordered by their appearance in a resource.
00133    (Note that having a single module copied into two resources is not
00134    possible).  Modules map back to their resource via an index into the
00135    resource table and an offset into the resource.  Modules also point
00136    to their source files, both the definition module and implementation
00137    module.  Because modules can be textually nested within other
00138    modules, a link to the parent (containing) module is required.  This
00139    module can textually contain other modules.  A link to the contiguous
00140    list of child (contained) modules is required.  Variables, statements,
00141    and types defined in the module are pointed to by indexing the head of
00142    the contiguous lists of contained variables, contained statements,
00143    and contained types.  */
00144 
00145 struct bfd_sym_modules_table_entry
00146 {
00147   unsigned long mte_rte_index;         /* Which resource it is in.  */
00148   unsigned long mte_res_offset;        /* Offset into the resource.  */
00149   unsigned long mte_size;              /* Size of module.  */
00150   char mte_kind;                       /* What kind of module this is.  */
00151   char mte_scope;                      /* How visible is it?  */
00152   unsigned long mte_parent;            /* Containing module.  */
00153   bfd_sym_file_reference mte_imp_fref; /* Implementation source.  */
00154   unsigned long mte_imp_end;           /* End of implementation source.  */
00155   unsigned long mte_nte_index;         /* The name of the module.  */
00156   unsigned long mte_cmte_index;        /* Modules contained in this.  */
00157   unsigned long mte_cvte_index;        /* Variables contained in this.  */
00158   unsigned long mte_clte_index;        /* Local labels defined here.  */
00159   unsigned long mte_ctte_index;        /* Types contained in this.  */
00160   unsigned long mte_csnte_idx_1;       /* CSNTE index of mte_snbr_first.  */
00161   unsigned long mte_csnte_idx_2;       /* CSNTE index of mte_snbr_last.  */
00162 };
00163 typedef struct bfd_sym_modules_table_entry bfd_sym_modules_table_entry;
00164 
00165 /* FILE REFERENCES TABLE (FRTE)
00166 
00167    The FILE REFERENCES TABLE maps from source file to module & offset.
00168    The table is ordered by increasing file offset.  Each new offset
00169    references a module.
00170 
00171                             FRT    = FILE_SOURCE_START
00172                                                  FILE_SOURCE_INCREMENT*
00173                                                  END_OF_LIST.
00174 
00175        *** THIS MECHANISM IS VERY SLOW FOR FILE+STATEMENT_NUMBER TO
00176        *** MODULE/CODE ADDRESS OPERATIONS.  ANOTHER MECHANISM IS
00177        ***    REQUIRED!!  */
00178 
00179 union bfd_sym_file_references_table_entry
00180 {
00181   struct
00182   {
00183     /* END_OF_LIST, FILE_NAME_INDEX, or module table entry.  */
00184     unsigned long type;
00185   }
00186   generic;
00187 
00188   struct
00189   {
00190     /* FILE_NAME_INDEX.  */
00191     unsigned long type;
00192     unsigned long nte_index;
00193     unsigned long mod_date;
00194   }
00195   filename;
00196 
00197   struct
00198   {
00199     /* < FILE_NAME_INDEX.  */
00200     unsigned long mte_index;
00201     unsigned long file_offset;
00202   }
00203   entry;
00204 };
00205 typedef union bfd_sym_file_references_table_entry bfd_sym_file_references_table_entry;
00206 
00207 /* CONTAINED MODULES TABLE (CMTE)
00208 
00209    Contained Modules are lists of indices into the modules table.  The
00210    lists are terminated by an END_OF_LIST index.  All entries are of the
00211    same size, hence mapping an index into a CMTE list is simple.
00212 
00213    CMT = MTE_INDEX* END_OF_LIST.  */
00214 
00215 union bfd_sym_contained_modules_table_entry
00216 {
00217   struct
00218   {
00219     /* END_OF_LIST, index.  */
00220     unsigned long type;
00221   }
00222   generic;
00223 
00224   struct
00225   {
00226     unsigned long mte_index; /* Index into the Modules Table.  */
00227     unsigned long nte_index; /* The name of the module.  */
00228   }
00229   entry;
00230 };
00231 typedef union bfd_sym_contained_modules_table_entry bfd_sym_contained_modules_table_entry;
00232 
00233 /* CONTAINED VARIABLES TABLE (CVTE)
00234 
00235    Contained Variables map into the module table, file table, name table, and type
00236    table.  Contained Variables are a contiguous list of source file change record,
00237    giving the name of and offset into the source file corresponding to all variables
00238    following.  Variable definition records contain an index into the name table (giving
00239    the text of the variable as it appears in the source code), an index into the type
00240    table giving the type of the variable, an increment added to the source file
00241    offset giving the start of the implementation of the variable, and a storage
00242    class address, giving information on variable's runtime address.
00243 
00244    CVT = SOURCE_FILE_CHANGE SYMBOL_INFO* END_OF_LIST.
00245    SYMBOL_INFO = SYMBOL_DEFINITION | SOURCE_FILE_CHANGE .
00246 
00247    All entries are of the same size, making the fetching of data simple.  The
00248    variable entries in the list are in ALPHABETICAL ORDER to simplify the display of
00249    available variables for several of the debugger's windows.  */
00250 
00251 /* 'la_size' determines the variant used below:
00252 
00253      == BFD_SYM_CVTE_SCA
00254      Traditional STORAGE_CLASS_ADDRESS;
00255 
00256      <= BFD_SYM_CVTE_LA_MAX_SIZE
00257      That many logical address bytes ("in-situ");
00258 
00259      == BFD_SYM_CVTE_BIG_LA
00260      Logical address bytes in constant pool, at offset 'big_la'.  */
00261 
00262 #define       BFD_SYM_CVTE_SCA 0          /* Indicate SCA variant of CVTE.  */
00263 #define       BFD_SYM_CVTE_LA_MAX_SIZE 13 /* Max# of logical address bytes in a CVTE.  */
00264 #define       BFD_SYM_CVTE_BIG_LA 127     /* Indicates LA redirection to constant pool.  */
00265 
00266 union bfd_sym_contained_variables_table_entry
00267 {
00268   struct
00269   {
00270     /* END_OF_LIST, SOURCE_FILE_CHANGE, or type table entry.  */
00271     unsigned long type;
00272   }
00273   generic;
00274 
00275   struct
00276   {
00277     /* SOURCE_FILE_CHANGE.  */
00278     unsigned long type;
00279     bfd_sym_file_reference fref;
00280   }
00281   file;
00282 
00283   struct
00284   {
00285     /* < SOURCE_FILE_CHANGE.  */
00286     unsigned long tte_index;
00287     unsigned long nte_index;
00288     unsigned long file_delta;                       /* Increment from previous source.  */
00289     unsigned char scope;
00290     unsigned char la_size;                          /* #bytes of LAs below.  */
00291 
00292     union
00293     {
00294       /* la_size == BFD_SYM_CVTE_SCA.  */
00295       struct
00296       {
00297        unsigned char sca_kind;                         /* Distinguish local from value/var formal.  */
00298        unsigned char sca_class;                    /* The storage class itself.  */
00299        unsigned long sca_offset;
00300       }
00301       scstruct;
00302 
00303       /* la_size <= BFD_SYM_CVTE_LA_MAX_SIZE.  */
00304       struct {
00305        unsigned char la[BFD_SYM_CVTE_LA_MAX_SIZE]; /* Logical address bytes.  */
00306        unsigned char la_kind;                      /* Eqv. cvte_location.sca_kind.  */
00307       }
00308       lastruct;
00309 
00310       /* la_size == BFD_SYM_CVTE_BIG_LA 127.  */
00311       struct
00312       {
00313        unsigned long big_la;                       /* Logical address bytes in constant pool.  */
00314        unsigned char big_la_kind;                  /* Eqv. cvte_location.sca_kind.  */
00315       }
00316       biglastruct;
00317     }
00318     address;
00319   }
00320   entry;
00321 };
00322 typedef union bfd_sym_contained_variables_table_entry bfd_sym_contained_variables_table_entry;
00323 
00324 /* CONTAINED STATEMENTS TABLE (CSNTE)
00325 
00326    Contained Statements table.  This table is similar to the Contained
00327    Variables table except that instead of VARIABLE_DEFINITION entries, this
00328    module contains STATEMENT_NUMBER_DEFINITION entries.  A statement number
00329    definition points back to the containing module (via an index into
00330    the module entry table) and contains the file and resource deltas
00331    to add to the previous values to get to this statement.
00332    All entries are of the same size, making the fetching of data simple.  The
00333    entries in the table are in order of increasing statement number within the
00334    source file.
00335 
00336    The Contained Statements table is indexed from two places.  An MTE contains
00337    an index to the first statement number within the module.  An FRTE contains
00338    an index to the first statement in the table (Possibly.  This is slow.)  Or
00339    a table of fast statement number to CSNTE entry mappings indexes into the
00340    table.  Choice not yet made.  */
00341 
00342 union bfd_sym_contained_statements_table_entry
00343 {
00344   struct
00345   {
00346     /* END_OF_LIST, SOURCE_FILE_CHANGE, or statement table entry.  */
00347     unsigned long type;
00348   }
00349   generic;
00350 
00351   struct
00352   {
00353     /* SOURCE_FILE_CHANGE.  */
00354     unsigned long type;
00355     bfd_sym_file_reference fref; /* File name table.  */
00356   }
00357   file;
00358 
00359   struct
00360   {
00361     unsigned long mte_index;     /* Which module contains it.  */
00362     unsigned long file_delta;    /* Where it is defined.  */
00363     unsigned long mte_offset;    /* Where it is in the module.  */
00364   }
00365   entry;
00366 };
00367 typedef union bfd_sym_contained_statements_table_entry bfd_sym_contained_statements_table_entry;
00368 
00369 /* CONTAINED LABELS TABLE (CLTE)
00370 
00371    Contained Labels table names those labels local to the module.  It is similar
00372    to the Contained Statements table.  */
00373 
00374 union bfd_sym_contained_labels_table_entry
00375 {
00376   struct
00377   {
00378     /* END_OF_LIST, SOURCE_FILE_CHANGE, index.  */
00379     unsigned long type;
00380   }
00381   generic;
00382 
00383   struct
00384   {
00385     /* SOURCE_FILE_CHANGE.  */
00386     unsigned long type;
00387     bfd_sym_file_reference fref;
00388   }
00389   file;
00390 
00391   struct
00392   {
00393     /* < SOURCE_FILE_CHANGE.  */
00394     unsigned long mte_index;   /* Which module contains us.  */
00395     unsigned long mte_offset;  /* Where it is in the module.  */
00396     unsigned long nte_index;   /* The name of the label.  */
00397     unsigned long file_delta;  /* Where it is defined.  */
00398     unsigned short scope;      /* How visible the label is.  */
00399   }
00400   entry;
00401 };
00402 typedef union bfd_sym_contained_labels_table_entry bfd_sym_contained_labels_table_entry;
00403 
00404 /* CONTAINED TYPES TABLE (CTTE)
00405 
00406    Contained Types define the named types that are in the module.  It is used to
00407    map name indices into type indices.  The type entries in the table are in
00408    alphabetical order by type name.  */
00409 
00410 union bfd_sym_contained_types_table_entry
00411 {
00412   struct
00413   {
00414     /* END_OF_LIST, SOURCE_FILE_CHANGE, or type table entry.  */
00415     unsigned long type;
00416   }
00417   generic;
00418 
00419   struct
00420   {
00421     /* SOURCE_FILE_CHANGE.  */
00422     unsigned long type;
00423     bfd_sym_file_reference fref;
00424   }
00425   file;
00426 
00427   struct
00428   {
00429     /* < SOURCE_FILE_CHANGE.  */
00430     unsigned long tte_index;
00431     unsigned long nte_index;
00432     unsigned long file_delta; /* From last file definition.  */
00433   }
00434   entry;
00435 };
00436 typedef union bfd_sym_contained_types_table_entry bfd_sym_contained_types_table_entry;
00437 
00438 /* TYPE TABLE (TTE).  */
00439 
00440 typedef unsigned long bfd_sym_type_table_entry;
00441 
00442 /* TYPE INFORMATION TABLE (TINFO).  */
00443 
00444 struct bfd_sym_type_information_table_entry
00445 {
00446   unsigned long nte_index;
00447   unsigned long physical_size;
00448   unsigned long logical_size;
00449   unsigned long offset;
00450 };
00451 typedef struct bfd_sym_type_information_table_entry bfd_sym_type_information_table_entry;
00452 
00453 /* FILE REFERENCES INDEX TABLE (FITE)
00454 
00455    The FRTE INDEX TABLE indexes into the FILE REFERENCE TABLE above.  The FRTE
00456    at that index is the FILE_SOURCE_START for a series of files.  The FRTEs are
00457    indexed from 1.  The list is terminated with an END_OF_LIST.  */
00458 
00459 union bfd_sym_file_references_index_table_entry
00460 {
00461   struct
00462   {
00463     unsigned long type;
00464   }
00465   generic;
00466 
00467   struct
00468   {
00469     unsigned long frte_index;  /* Index into the FRTE table.  */
00470     unsigned long nte_index;   /* Name table index, gives filename.  */
00471   }
00472   entry;
00473 };
00474 typedef union bfd_sym_file_references_index_table_entry bfd_sym_file_references_index_table_entry;
00475 
00476 /* CONSTANT POOL (CONST)
00477 
00478    The CONSTANT_POOL consists of entries that start on word boundaries.  The entries
00479    are referenced by byte index into the constant pool, not by record number.
00480 
00481    Each entry takes the form:
00482 
00483    <16-bit size>
00484    <that many bytes of stuff>
00485 
00486    Entries do not cross page boundaries.  */
00487 
00488 typedef short bfd_sym_constant_pool_entry;
00489 
00490 /* The DISK_SYMBOL_HEADER_BLOCK is the first record in a .SYM file,
00491    defining the physical characteristics of the symbolic information.
00492    The remainder of the * .SYM file is stored in fixed block
00493    allocations. For the purposes of paging, the * file is considered
00494    to be an array of dshb_page_size blocks, with block 0 (and *
00495    possibly more) devoted to the DISK_SYMBOL_HEADER_BLOCK.
00496 
00497    The dti_object_count field means that the allowed indices for that
00498    type of object are 0 .. dti_object_count. An index of 0, although
00499    allowed, is never done.  However, an 0th entry is created in the
00500    table.  That entry is filled with all zeroes.  The reason for this
00501    is to avoid off-by-one programming errors that would otherwise
00502    occur: an index of k *MEANS* k, not k-1 when going to the disk
00503    table.  */
00504 
00505 struct bfd_sym_table_info
00506 {
00507   unsigned long dti_first_page;   /* First page for this table.  */
00508   unsigned long dti_page_count;   /* Number of pages for the table.  */
00509   unsigned long dti_object_count; /* Number of objects in the table.  */
00510 };
00511 typedef struct bfd_sym_table_info bfd_sym_table_info;
00512 
00513 struct bfd_sym_header_block
00514 {
00515   unsigned char dshb_id[32];      /* Version information.  */
00516   unsigned short dshb_page_size;  /* Size of the pages/blocks.  */
00517   unsigned long dshb_hash_page;   /* Disk page for the hash table.  */
00518   unsigned long dshb_root_mte;    /* MTE index of the program root.  */
00519   unsigned long dshb_mod_date;    /* modification date of executable.  */
00520   bfd_sym_table_info dshb_frte;   /* Per TABLE information.  */
00521   bfd_sym_table_info dshb_rte;
00522   bfd_sym_table_info dshb_mte;
00523   bfd_sym_table_info dshb_cmte;
00524   bfd_sym_table_info dshb_cvte;
00525   bfd_sym_table_info dshb_csnte;
00526   bfd_sym_table_info dshb_clte;
00527   bfd_sym_table_info dshb_ctte;
00528   bfd_sym_table_info dshb_tte;
00529   bfd_sym_table_info dshb_nte;
00530   bfd_sym_table_info dshb_tinfo;
00531   bfd_sym_table_info dshb_fite;   /* File information.  */
00532   bfd_sym_table_info dshb_const;  /* Constant pool.  */
00533 
00534   unsigned char dshb_file_creator[4]; /* Executable's creator.  */
00535   unsigned char dshb_file_type[4];    /* Executable's file type.  */
00536 };
00537 typedef struct bfd_sym_header_block bfd_sym_header_block;
00538 
00539 struct bfd_sym_data_struct
00540 {
00541   unsigned char *name_table;
00542   bfd_sym_header_block header;
00543   bfd_sym_version version;
00544   bfd *sbfd;
00545 };
00546 typedef struct bfd_sym_data_struct bfd_sym_data_struct;
00547 
00548 extern bfd_boolean bfd_sym_mkobject
00549   (bfd *);
00550 extern void bfd_sym_print_symbol
00551   (bfd *, PTR, asymbol *, bfd_print_symbol_type);
00552 extern bfd_boolean bfd_sym_valid
00553   (bfd *);
00554 extern unsigned char * bfd_sym_read_name_table
00555   (bfd *, bfd_sym_header_block *);
00556 extern void bfd_sym_parse_file_reference_v32
00557   (unsigned char *, size_t, bfd_sym_file_reference *);
00558 extern void bfd_sym_parse_disk_table_v32
00559   (unsigned char *, size_t, bfd_sym_table_info *);
00560 extern void bfd_sym_parse_header_v32
00561   (unsigned char *, size_t, bfd_sym_header_block *);
00562 extern int bfd_sym_read_header_v32
00563   (bfd *, bfd_sym_header_block *);
00564 extern int bfd_sym_read_header_v34
00565   (bfd *, bfd_sym_header_block *);
00566 extern int bfd_sym_read_header
00567   (bfd *, bfd_sym_header_block *, bfd_sym_version);
00568 extern int bfd_sym_read_version
00569   (bfd *, bfd_sym_version *);
00570 extern void bfd_sym_display_table_summary
00571   (FILE *, bfd_sym_table_info *, const char *);
00572 extern void bfd_sym_display_header
00573   (FILE *, bfd_sym_header_block *);
00574 extern void bfd_sym_parse_resources_table_entry_v32
00575   (unsigned char *, size_t, bfd_sym_resources_table_entry *);
00576 extern void bfd_sym_parse_modules_table_entry_v33
00577   (unsigned char *, size_t, bfd_sym_modules_table_entry *);
00578 extern void bfd_sym_parse_file_references_table_entry_v32
00579   (unsigned char *, size_t, bfd_sym_file_references_table_entry *);
00580 extern void bfd_sym_parse_contained_modules_table_entry_v32
00581   (unsigned char *, size_t, bfd_sym_contained_modules_table_entry *);
00582 extern void bfd_sym_parse_contained_variables_table_entry_v32
00583   (unsigned char *, size_t, bfd_sym_contained_variables_table_entry *);
00584 extern void bfd_sym_parse_contained_statements_table_entry_v32
00585   (unsigned char *, size_t, bfd_sym_contained_statements_table_entry *);
00586 extern void bfd_sym_parse_contained_labels_table_entry_v32
00587   (unsigned char *, size_t, bfd_sym_contained_labels_table_entry *);
00588 extern void bfd_sym_parse_type_table_entry_v32
00589   (unsigned char *, size_t, bfd_sym_type_table_entry *);
00590 extern int bfd_sym_fetch_resources_table_entry
00591   (bfd *, bfd_sym_resources_table_entry *, unsigned long);
00592 extern int bfd_sym_fetch_modules_table_entry
00593   (bfd *, bfd_sym_modules_table_entry *, unsigned long);
00594 extern int bfd_sym_fetch_file_references_table_entry
00595   (bfd *, bfd_sym_file_references_table_entry *, unsigned long);
00596 extern int bfd_sym_fetch_contained_modules_table_entry
00597   (bfd *, bfd_sym_contained_modules_table_entry *, unsigned long);
00598 extern int bfd_sym_fetch_contained_variables_table_entry
00599   (bfd *, bfd_sym_contained_variables_table_entry *, unsigned long);
00600 extern int bfd_sym_fetch_contained_statements_table_entry
00601   (bfd *, bfd_sym_contained_statements_table_entry *, unsigned long);
00602 extern int bfd_sym_fetch_contained_labels_table_entry
00603   (bfd *, bfd_sym_contained_labels_table_entry *, unsigned long);
00604 extern int bfd_sym_fetch_contained_types_table_entry
00605   (bfd *, bfd_sym_contained_types_table_entry *, unsigned long);
00606 extern int bfd_sym_fetch_file_references_index_table_entry
00607   (bfd *, bfd_sym_file_references_index_table_entry *, unsigned long);
00608 extern int bfd_sym_fetch_constant_pool_entry
00609   (bfd *, bfd_sym_constant_pool_entry *, unsigned long);
00610 extern int bfd_sym_fetch_type_table_entry
00611   (bfd *, bfd_sym_type_table_entry *, unsigned long);
00612 extern int bfd_sym_fetch_type_information_table_entry
00613   (bfd *, bfd_sym_type_information_table_entry *, unsigned long);
00614 extern int bfd_sym_fetch_type_table_information
00615   (bfd *, bfd_sym_type_information_table_entry *, unsigned long);
00616 extern const unsigned char * bfd_sym_symbol_name
00617   (bfd *, unsigned long);
00618 extern const unsigned char * bfd_sym_module_name
00619   (bfd *, unsigned long);
00620 extern const char * bfd_sym_unparse_storage_kind
00621   (enum bfd_sym_storage_kind);
00622 extern const char * bfd_sym_unparse_storage_class
00623   (enum bfd_sym_storage_class);
00624 extern const char * bfd_sym_unparse_module_kind
00625   (enum bfd_sym_module_kind);
00626 extern const char * bfd_sym_unparse_symbol_scope
00627   (enum bfd_sym_symbol_scope);
00628 extern void bfd_sym_print_file_reference
00629   (bfd *, FILE *, bfd_sym_file_reference *);
00630 extern void bfd_sym_print_resources_table_entry
00631   (bfd *, FILE *, bfd_sym_resources_table_entry *);
00632 extern void bfd_sym_print_modules_table_entry
00633   (bfd *, FILE *, bfd_sym_modules_table_entry *);
00634 extern void bfd_sym_print_file_references_table_entry
00635   (bfd *, FILE *, bfd_sym_file_references_table_entry *);
00636 extern void bfd_sym_print_contained_modules_table_entry
00637   (bfd *, FILE *, bfd_sym_contained_modules_table_entry *);
00638 extern void bfd_sym_print_contained_variables_table_entry
00639   (bfd *, FILE *f, bfd_sym_contained_variables_table_entry *);
00640 extern void bfd_sym_print_contained_statements_table_entry
00641   (bfd *, FILE *, bfd_sym_contained_statements_table_entry *);
00642 extern void bfd_sym_print_contained_labels_table_entry
00643   (bfd *, FILE *, bfd_sym_contained_labels_table_entry *);
00644 extern void bfd_sym_print_contained_types_table_entry
00645   (bfd *, FILE *, bfd_sym_contained_types_table_entry *);
00646 extern const char * bfd_sym_type_operator_name
00647   (unsigned char);
00648 extern const char * bfd_sym_type_basic_name
00649   (unsigned char);
00650 extern int bfd_sym_fetch_long
00651   (unsigned char *, unsigned long, unsigned long, unsigned long *, long *);
00652 extern void bfd_sym_print_type_information
00653   (bfd *, FILE *, unsigned char *, unsigned long, unsigned long, unsigned long *);
00654 extern void bfd_sym_print_type_information_table_entry
00655   (bfd *, FILE *, bfd_sym_type_information_table_entry *);
00656 extern void bfd_sym_print_file_references_index_table_entry
00657   (bfd *, FILE *, bfd_sym_file_references_index_table_entry *);
00658 extern void bfd_sym_print_constant_pool_entry
00659   (bfd *, FILE *, bfd_sym_constant_pool_entry *);
00660 extern unsigned char * bfd_sym_display_name_table_entry
00661   (bfd *, FILE *, unsigned char *);
00662 extern void bfd_sym_display_name_table
00663   (bfd *, FILE *);
00664 extern void bfd_sym_display_resources_table
00665   (bfd *, FILE *);
00666 extern void bfd_sym_display_modules_table
00667   (bfd *, FILE *);
00668 extern void bfd_sym_display_file_references_table
00669   (bfd *, FILE *);
00670 extern void bfd_sym_display_contained_modules_table
00671   (bfd *, FILE *);
00672 extern void bfd_sym_display_contained_variables_table
00673   (bfd *, FILE *);
00674 extern void bfd_sym_display_contained_statements_table
00675   (bfd *, FILE *);
00676 extern void bfd_sym_display_contained_labels_table
00677   (bfd *, FILE *);
00678 extern void bfd_sym_display_contained_types_table
00679   (bfd *, FILE *);
00680 extern void bfd_sym_display_file_references_index_table
00681   (bfd *, FILE *);
00682 extern void bfd_sym_display_constant_pool
00683   (bfd *, FILE *);
00684 extern void bfd_sym_display_type_information_table
00685   (bfd *, FILE *);
00686 extern int bfd_sym_scan
00687   (bfd *, bfd_sym_version, bfd_sym_data_struct *);
00688 extern const bfd_target * bfd_sym_object_p
00689   (bfd *);
00690 extern void bfd_sym_get_symbol_info
00691   (bfd *, asymbol *, symbol_info *);
00692 extern long bfd_sym_get_symtab_upper_bound
00693   (bfd *);
00694 extern long bfd_sym_canonicalize_symtab
00695   (bfd *, asymbol **);
00696 extern int bfd_sym_sizeof_headers
00697   (bfd *, struct bfd_link_info *);
00698 
00699 #endif /* __xSYM_H__ */