aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 80b26aa..00684d5 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -958,6 +958,12 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data)
return;
}
+ if (ptr->howto == NULL)
+ {
+ *failedp = TRUE;
+ return;
+ }
+
src_rela.r_offset = ptr->address + addr_offset;
src_rela.r_info = ELF_R_INFO (n, ptr->howto->type);
src_rela.r_addend = ptr->addend;