* libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
[deliverable/binutils-gdb.git] / bfd / libcoff.h
index a29b9c2ad6acbc3f46af7edeb94a8b03eb6bb0b6..0eba7a6e47dac4d79899eaf88ee1a38f95585f21 100644 (file)
@@ -18,64 +18,53 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-/* $Id$ */
 
 /* Object file tdata; access macros */
 
-#define obj_icof(bfd)          ((struct icofdata *) ((bfd)->tdata))
-#define coff_data(bfd)         ((struct icofdata *) ((bfd)->tdata))
-#define exec_hdr(bfd)          (obj_icof(bfd)->hdr)
-#define obj_symbols(bfd)       (obj_icof(bfd)->symbols)
-#define        obj_sym_filepos(bfd)    (obj_icof(bfd)->sym_filepos)
+#define coff_data(bfd)         ((bfd)->tdata.coff_obj_data)
+#define exec_hdr(bfd)          (coff_data(bfd)->hdr)
+#define obj_symbols(bfd)       (coff_data(bfd)->symbols)
+#define        obj_sym_filepos(bfd)    (coff_data(bfd)->sym_filepos)
 
-#define obj_relocbase(bfd)     (obj_icof(bfd)->relocbase)
-#define obj_raw_syments(bfd)   (obj_icof(bfd)->raw_syments)
-#define obj_convert(bfd)       (obj_icof(bfd)->conversion_table)
+#define obj_relocbase(bfd)     (coff_data(bfd)->relocbase)
+#define obj_raw_syments(bfd)   (coff_data(bfd)->raw_syments)
+#define obj_convert(bfd)       (coff_data(bfd)->conversion_table)
 #if CFILE_STUFF
-#define obj_symbol_slew(bfd)   (obj_icof(bfd)->symbol_index_slew)
+#define obj_symbol_slew(bfd)   (coff_data(bfd)->symbol_index_slew)
 #else
 #define obj_symbol_slew(bfd) 0
 #endif
-#define obj_string_table(bfd)  (obj_icof(bfd)->string_table)
-
-#if 0
-typedef struct coff_ptr_struct
-{
-  unsigned int offset;
-  char fix_tag;
-  char fix_end;
-  union {
-    union internal_auxent auxent;
-    struct internal_syment syment;
-  } u;
-} combined_entry_type;
 
 
-typedef struct 
-{
-  asymbol symbol;
-  combined_entry_type *native;
-  struct lineno_cache_entry *lineno;
-} coff_symbol_type;
-#endif
+/* `Tdata' information kept for COFF files.  */
 
-typedef struct icofdata 
+typedef struct coff_tdata
 {
-
-struct   coff_symbol_struct *symbols;  /* symtab for input bfd */
+  struct   coff_symbol_struct *symbols;        /* symtab for input bfd */
   unsigned int *conversion_table;
   file_ptr sym_filepos;
 
   long symbol_index_slew;      /* used during read to mark whether a
                                   C_FILE symbol as been added. */
 
-struct coff_ptr_struct *raw_syments;
+  struct coff_ptr_struct *raw_syments;
   struct lineno *raw_linenos;
   unsigned int raw_syment_count;
-  char *string_table;
   unsigned short flags;
+
   /* These are only valid once writing has begun */
   long int relocbase;
+
+  /* These members communicate important constants about the symbol table
+     to GDB's symbol-reading code.  These `constants' unfortunately vary
+     from coff implementation to implementation...  */
+  unsigned local_n_btmask;
+  unsigned local_n_btshft;
+  unsigned local_n_tmask;
+  unsigned local_n_tshift;
+  unsigned local_symesz;
+  unsigned local_auxesz;
+  unsigned local_linesz;
 } coff_data_type;
 
 /* We take the address of the first element of a asymbol to ensure that the
@@ -84,78 +73,44 @@ struct coff_ptr_struct *raw_syments;
 
 
 
-/*THE FOLLOWING IS EXTRACTED FROM THE SOURCE*/
-
-/* FROM coffcode.h*/
-/* ------------------------------START FROM coffcode.h
-
-The hidden information for an asymbol is:
-*/
-
- typedef struct coff_ptr_struct
- {
-
-/*
-Remembers the offset from the first symbol in the file for this
-symbol. Generated by @code{coff_renumber_symbols}.
-*/
-
-   unsigned int offset;
+/* And more taken from the source .. */
 
-/*
-Should the tag field of this symbol be renumbered.
-Created by @code{coff_pointerize_aux}.
-*/
-
-   char fix_tag;
-
-/*
-Should the endidx field of this symbol be renumbered.
-Created by @code{coff_pointerize_aux}.
-*/
-
-   char fix_end;
-
-/*
-The container for the symbol structure as read and translated from the file.
-*/
-
-   union {
-     union internal_auxent auxent;
-     struct internal_syment syment;
-   } u;
- } combined_entry_type;
-
-/*
-
-Each canonical asymbol really looks like this:
-*/
-
- typedef struct coff_symbol_struct
- {
-
-/*
-The actual symbol which the rest of BFD works with
-*/
+typedef struct coff_ptr_struct 
+{
 
-   asymbol symbol;
+        /* Remembers the offset from the first symbol in the file for
+          this symbol. Generated by coff_renumber_symbols. */
+unsigned int offset;
 
-/*
-A pointer to the hidden information for this symbol
-*/
+        /* Should the tag field of this symbol be renumbered.
+          Created by coff_pointerize_aux. */
+char fix_tag;
 
-   combined_entry_type *native;
+        /* Should the endidx field of this symbol be renumbered.
+          Created by coff_pointerize_aux. */
+char fix_end;
 
-/*
-A pointer to the linenumber information for this symbol
-*/
+        /* The container for the symbol structure as read and translated
+           from the file. */
 
-   struct lineno_cache_entry *lineno;
- } coff_symbol_type;
+union {
+   union internal_auxent auxent;
+   struct internal_syment syment;
+ } u;
+} combined_entry_type;
 
-/*
 
--------------------------------END FROM coffcode.h*/
/* Each canonical asymbol really looks like this: */
 
+typedef struct coff_symbol_struct
+{
+  /* The actual symbol which the rest of BFD works with */
+  asymbol symbol;
 
+  /* A pointer to the hidden information for this symbol */
+  combined_entry_type *native;
 
+  /* A pointer to the linenumber information for this symbol */
+  struct lineno_cache_entry *lineno;
+  boolean done_lineno;
+} coff_symbol_type;
This page took 0.026714 seconds and 4 git commands to generate.