mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-14 12:40:58 +08:00
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
rather than 0.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf.c (assign_section_numbers): Fix a typo.
|
* elf.c (assign_section_numbers): Fix a typo.
|
||||||
|
@ -2687,7 +2687,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
|
|
||||||
syms = bfd_malloc ((symcount + 1) * sizeof (*syms));
|
syms = bfd_malloc ((symcount + 1) * sizeof (*syms));
|
||||||
if (syms == NULL)
|
if (syms == NULL)
|
||||||
return 0;
|
return -1;
|
||||||
|
|
||||||
if (!relocatable && static_count != 0 && dyn_count != 0)
|
if (!relocatable && static_count != 0 && dyn_count != 0)
|
||||||
{
|
{
|
||||||
@ -2758,11 +2758,15 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
|
|
||||||
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
|
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
|
||||||
relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
|
relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
|
||||||
|
if (relcount == 0)
|
||||||
if (! relcount
|
|
||||||
|| ! (*slurp_relocs) (abfd, opd, static_syms, FALSE))
|
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
if (!(*slurp_relocs) (abfd, opd, static_syms, FALSE))
|
||||||
|
{
|
||||||
|
count = -1;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
size = 0;
|
size = 0;
|
||||||
for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
|
for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
|
||||||
{
|
{
|
||||||
@ -2794,7 +2798,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
s = *ret = bfd_malloc (size);
|
s = *ret = bfd_malloc (size);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
{
|
{
|
||||||
count = 0;
|
count = -1;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2847,6 +2851,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
free_contents_and_exit:
|
free_contents_and_exit:
|
||||||
free (contents);
|
free (contents);
|
||||||
}
|
}
|
||||||
|
count = -1;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2866,10 +2871,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
|
|
||||||
s = *ret = bfd_malloc (size);
|
s = *ret = bfd_malloc (size);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
{
|
goto free_contents_and_exit;
|
||||||
count = 0;
|
|
||||||
goto free_contents_and_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
names = (char *) (s + count);
|
names = (char *) (s + count);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user