* xcofflink.c (xcoff_link_check_archive_element): Only free the
symbol table if it was created by the current call.
+2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
+
+ * xcofflink.c (xcoff_link_check_archive_element): Only free the
+ symbol table if it was created by the current call.
+
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
struct bfd_link_info *info,
bfd_boolean *pneeded)
{
+ bfd_boolean keep_syms_p;
+
+ keep_syms_p = (obj_coff_external_syms (abfd) != NULL);
if (! _bfd_coff_get_external_symbols (abfd))
return FALSE;
{
if (! xcoff_link_add_symbols (abfd, info))
return FALSE;
+ if (info->keep_memory)
+ keep_syms_p = TRUE;
}
- if (! info->keep_memory || ! *pneeded)
+ if (!keep_syms_p)
{
if (! _bfd_coff_free_symbols (abfd))
return FALSE;