diff options
Diffstat (limited to 'bfd/archive.c')
-rw-r--r-- | bfd/archive.c | 7 |
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; } } |