summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-06-06 02:12:04 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-06-06 02:12:04 +0000
commit896e8aec25ff134f3b1860290553698ced6e82fb (patch)
tree3c26cf5d408925068ac0df8509998e6b0b0c9b37
parentb0e3fe606c2f91fe154fcecf5e800727614957aa (diff)
downloadgdb-896e8aec25ff134f3b1860290553698ced6e82fb.tar.gz
* elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
NULL function pointers.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfcode.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4b54cc23b80..e5fe8d67e62 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+ * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
+ NULL function pointers.
+
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
* simple.c (bfd_simple_get_relocated_section_contents): Call
_bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 55c5b4264e0..0263631e791 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);