mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 16:38:05 +08:00
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
out of range .opd symbols.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2009-05-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
|
||||||
|
out of range .opd symbols.
|
||||||
|
|
||||||
2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
|
2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||||
|
|
||||||
* coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
|
* coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
|
||||||
|
@ -3033,6 +3033,10 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
{
|
{
|
||||||
bfd_vma ent;
|
bfd_vma ent;
|
||||||
|
|
||||||
|
/* Ignore bogus symbols. */
|
||||||
|
if (syms[i]->value > opd->size - 8)
|
||||||
|
continue;
|
||||||
|
|
||||||
ent = bfd_get_64 (abfd, contents + syms[i]->value);
|
ent = bfd_get_64 (abfd, contents + syms[i]->value);
|
||||||
if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
|
if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
|
||||||
{
|
{
|
||||||
@ -3126,6 +3130,9 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
|||||||
{
|
{
|
||||||
bfd_vma ent;
|
bfd_vma ent;
|
||||||
|
|
||||||
|
if (syms[i]->value > opd->size - 8)
|
||||||
|
continue;
|
||||||
|
|
||||||
ent = bfd_get_64 (abfd, contents + syms[i]->value);
|
ent = bfd_get_64 (abfd, contents + syms[i]->value);
|
||||||
if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
|
if (!sym_exists_at (syms, opdsymend, symcount, -1, ent))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user