+2005-04-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
+ rather than 0.
+
2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (assign_section_numbers): Fix a typo.
syms = bfd_malloc ((symcount + 1) * sizeof (*syms));
if (syms == NULL)
- return 0;
+ return -1;
if (!relocatable && static_count != 0 && dyn_count != 0)
{
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
-
- if (! relcount
- || ! (*slurp_relocs) (abfd, opd, static_syms, FALSE))
+ if (relcount == 0)
goto done;
+ if (!(*slurp_relocs) (abfd, opd, static_syms, FALSE))
+ {
+ count = -1;
+ goto done;
+ }
+
size = 0;
for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
{
s = *ret = bfd_malloc (size);
if (s == NULL)
{
- count = 0;
+ count = -1;
goto done;
}
free_contents_and_exit:
free (contents);
}
+ count = -1;
goto done;
}
s = *ret = bfd_malloc (size);
if (s == NULL)
- {
- count = 0;
- goto free_contents_and_exit;
- }
+ goto free_contents_and_exit;
names = (char *) (s + count);