aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecoff.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-01-03 18:05:19 +0000
committerIan Lance Taylor <ian@airs.com>1994-01-03 18:05:19 +0000
commitb59f0276facbc819889ed96d1343ee804f4f761d (patch)
tree65eb361cd2eaa9eb07396ed917a09c329e13083a /bfd/ecoff.c
parentb35885f22647eda4e4a31efaaff96fa3c178073f (diff)
downloadgdb-b59f0276facbc819889ed96d1343ee804f4f761d.zip
gdb-b59f0276facbc819889ed96d1343ee804f4f761d.tar.gz
gdb-b59f0276facbc819889ed96d1343ee804f4f761d.tar.bz2
* libbfd-in.h (struct artdata): Added tdata field.
(_bfd_add_bfd_to_archive_cache): Declare. (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr. * libbfd.h: Rebuilt. * archive.c: Cleaned up some more. (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize pointer elements of artdata. (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache. (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr. (get_extended_arelt_filename, get_elt_at_filepos, bfd_construct_extended_name_table, bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static. * ecoff.c: Some comment changes. (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set ardata->tdata to raw_armap. (ecoff_archive_p): Initialize pointer elements of artdata. * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of add_bfd_to_cache.
Diffstat (limited to 'bfd/ecoff.c')
-rw-r--r--bfd/ecoff.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 511ab59..fb4960a 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1147,7 +1147,7 @@ ecoff_get_symtab_upper_bound (abfd)
return (bfd_get_symcount (abfd) + 1) * (sizeof (ecoff_symbol_type *));
}
-/* Get the canonicals symbols. */
+/* Get the canonical symbols. */
unsigned int
ecoff_get_symtab (abfd, alocation)
@@ -2811,10 +2811,10 @@ ecoff_write_object_contents (abfd)
}
/* Archive handling. ECOFF uses what appears to be a unique type of
- archive header (which I call an armap). The byte ordering of the
- armap and the contents are encoded in the name of the armap itself.
- At least for now, we only support archives with the same byte
- ordering in the armap and the contents.
+ archive header (armap). The byte ordering of the armap and the
+ contents are encoded in the name of the armap itself. At least for
+ now, we only support archives with the same byte ordering in the
+ armap and the contents.
The first four bytes in the armap are the number of symbol
definitions. This is always a power of two.
@@ -2830,10 +2830,6 @@ ecoff_write_object_contents (abfd)
The symbols are hashed into the armap with a closed hashing scheme.
See the functions below for the details of the algorithm.
- We could use the hash table when looking up symbols in a library.
- This would require a new BFD target entry point to replace the
- bfd_get_next_mapent function used by the linker.
-
After the symbol definitions comes four bytes holding the size of
the string table, followed by the string table itself. */
@@ -2942,7 +2938,7 @@ ecoff_slurp_armap (abfd)
/* Read in the armap. */
ardata = bfd_ardata (abfd);
- mapdata = snarf_ar_hdr (abfd);
+ mapdata = _bfd_snarf_ar_hdr (abfd);
if (mapdata == (struct areltdata *) NULL)
return false;
parsed_size = mapdata->parsed_size;
@@ -2962,6 +2958,8 @@ ecoff_slurp_armap (abfd)
return false;
}
+ ardata->tdata = (PTR) raw_armap;
+
count = bfd_h_get_32 (abfd, (PTR) raw_armap);
ardata->symdef_count = 0;
@@ -3232,6 +3230,11 @@ ecoff_archive_p (abfd)
}
bfd_ardata (abfd)->first_file_filepos = SARMAG;
+ bfd_ardata (abfd)->cache = NULL;
+ bfd_ardata (abfd)->archive_head = NULL;
+ bfd_ardata (abfd)->symdefs = NULL;
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->tdata = NULL;
if (ecoff_slurp_armap (abfd) == false
|| ecoff_slurp_extended_name_table (abfd) == false)