aboutsummaryrefslogtreecommitdiff
path: root/bfd/libcoff.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/libcoff.h')
-rw-r--r--bfd/libcoff.h100
1 files changed, 81 insertions, 19 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 8425340..0d2f6f4 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -1,25 +1,25 @@
-/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
+/* BFD COFF object file private structure.
+ Copyright (C) 1990-1991 Free Software Foundation, Inc.
+ Written by Cygnus Support.
-This file is part of BFD, the Binary File Diddler.
+This file is part of BFD, the Binary File Descriptor library.
-BFD is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-BFD is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with BFD; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* $Id$ */
-/* BFD COFF object file private structure. */
-
/* Object file tdata; access macros */
#define obj_icof(bfd) ((struct icofdata *) ((bfd)->tdata))
@@ -38,23 +38,38 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#endif
#define obj_string_table(bfd) (obj_icof(bfd)->string_table)
-typedef struct {
+#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;
- struct internal_syment *native;
+ combined_entry_type *native;
struct lineno_cache_entry *lineno;
} coff_symbol_type;
+#endif
typedef struct icofdata
{
-/* struct internal_aouthdr hdr; /* exec file header */
- coff_symbol_type *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 internal_syment *raw_syments;
+struct coff_ptr_struct *raw_syments;
struct lineno *raw_linenos;
unsigned int raw_syment_count;
char *string_table;
@@ -68,7 +83,54 @@ typedef struct icofdata
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
-/* Generic COFF swapping routines -- also used by GDB. */
-PROTO (void, bfd_coff_swap_sym, (bfd *, SYMENT *));
-PROTO (void, bfd_coff_swap_aux, (bfd *, AUXENT *, int, int));
-PROTO (void, bfd_coff_swap_lineno, (bfd *, LINENO *));
+
+/*THE FOLLOWING*/
+
+/* 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;
+
+ /* 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
+ */
+ 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;
+ } coff_symbol_type;