idx != BFD_NO_MORE_SYMBOLS;
idx = bfd_get_next_mapent (abfd, idx, &thesym))
{
- bfd *elt;
if (!everprinted)
{
printf (_("\nArchive index:\n"));
everprinted = true;
}
- elt = bfd_get_elt_at_index (abfd, idx);
- if (elt == NULL)
- bfd_fatal ("bfd_get_elt_at_index");
- if (thesym->name != (char *) NULL)
+ if (thesym->name != NULL)
{
print_symname ("%s", NULL, thesym->name, abfd);
- printf (" in %s\n", bfd_get_filename (elt));
+ bfd *elt = bfd_get_elt_at_index (abfd, idx);
+ if (elt)
+ printf (" in %s\n", bfd_get_filename (elt));
+ else
+ printf ("\n");
}
}
}
int keep = 0;
asymbol *sym;
- sym = bfd_minisymbol_to_symbol (abfd, is_dynamic, (const void *) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, is_dynamic, from, store);
if (sym == NULL)
- bfd_fatal (bfd_get_filename (abfd));
+ continue;
if (sym->name != NULL
&& sym->name[0] == '_'
}
symcount = bfd_read_minisymbols (abfd, dynamic, &minisyms, &size);
- if (symcount < 0)
- {
- if (dynamic && bfd_get_error () == bfd_error_no_symbols)
- {
- if (!quiet)
- non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
- return;
- }
-
- bfd_fatal (bfd_get_filename (abfd));
- }
-
- if (symcount == 0)
+ if (symcount <= 0)
{
if (!quiet)
non_fatal (_("%s: no symbols"), bfd_get_filename (abfd));
dyn_syms = (asymbol **) xmalloc (storage);
dyn_count = bfd_canonicalize_dynamic_symtab (abfd, dyn_syms);
if (dyn_count < 0)
- bfd_fatal (bfd_get_filename (abfd));
+ dyn_count = 0;
}
}
if (arfile == NULL)
{
if (bfd_get_error () != bfd_error_no_more_archived_files)
- bfd_fatal (bfd_get_filename (file));
+ bfd_nonfatal (bfd_get_filename (file));
break;
}
free_lineno_cache (file);
if (!bfd_close (file))
- bfd_fatal (filename);
+ retval = false;
return retval;
}