aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-01 22:12:00 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-01 22:12:00 +0000
commitdfe09c4926f59250567b319e77a1d3340d783894 (patch)
tree55c5765bcf3dc21863def9a6c734d4c21b062860 /bfd/archive.c
parent5c8444f8f80fee5a32dfecbc0e408640c57c6809 (diff)
downloadfsf-binutils-gdb-dfe09c4926f59250567b319e77a1d3340d783894.zip
fsf-binutils-gdb-dfe09c4926f59250567b319e77a1d3340d783894.tar.gz
fsf-binutils-gdb-dfe09c4926f59250567b319e77a1d3340d783894.tar.bz2
* archive.c (_bfd_write_archive_contents): Once we've found an
object, don't bother to look for more when deciding whether to build a map. (compute_and_write_armap): After adding the symbols for a BFD, call bfd_free_cached_info on it.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 88e6dfa..589199b 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1476,7 +1476,7 @@ _bfd_write_archive_contents (arch)
(char *) arch_hdr (current)));
}
- if (makemap)
+ if (makemap && ! hasobjects)
{ /* don't bother if we won't make a map! */
if ((bfd_check_format (current, bfd_object))
#if 0 /* FIXME -- these are not set correctly */
@@ -1705,6 +1705,11 @@ compute_and_write_armap (arch, elength)
}
}
}
+
+ /* Now ask the BFD to free up any cached information, so we
+ don't fill all of memory with symbol tables. */
+ if (! bfd_free_cached_info (current))
+ goto error_return;
}
}