diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4b54cc23b8..e5fe8d67e6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-06-05 Daniel Jacobowitz + + * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference + NULL function pointers. + 2003-06-05 Daniel Jacobowitz * simple.c (bfd_simple_get_relocated_section_contents): Call diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 55c5b4264e..0263631e79 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -1363,7 +1363,9 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, relent->addend = rela.r_addend; - if (entsize == sizeof (Elf_External_Rela)) + if ((entsize == sizeof (Elf_External_Rela) + && ebd->elf_info_to_howto != NULL) + || ebd->elf_info_to_howto_rel == NULL) (*ebd->elf_info_to_howto) (abfd, relent, &rela); else (*ebd->elf_info_to_howto_rel) (abfd, relent, &rela);