free_lineno_cache frees symbol and relocation data used when displaying
line number info for symbols (nm -l). Currently that is done when
closing the bfd, but that's not ideal for archives since that results
in two bfds worth of memory in use.
* nm.c (display_rel_file): Call free_lineno_cache here..
(display_archive, display_file): ..not here.
else
print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
- if (synthsyms)
- free (synthsyms);
+ free_lineno_cache (abfd);
+ free (synthsyms);
free (minisyms);
free (symsizes);
}
if (last_arfile != NULL)
{
- free_lineno_cache (last_arfile);
bfd_close (last_arfile);
if (arfile == last_arfile)
return;
}
if (last_arfile != NULL)
- {
- free_lineno_cache (last_arfile);
- bfd_close (last_arfile);
- }
+ bfd_close (last_arfile);
}
static bool
retval = false;
}
- free_lineno_cache (file);
if (!bfd_close (file))
retval = false;