diff options
author | Nick Clifton <nickc@redhat.com> | 2005-07-06 10:35:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-07-06 10:35:41 +0000 |
commit | 0adc9281f0ab9962eb5aa72fe6e8113f9014a93b (patch) | |
tree | 4a3249e0c2288bbcf84a4dab0367197d77e68cbc /bfd/ecoff.c | |
parent | gas/ (diff) | |
download | binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.tar.gz binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.tar.bz2 binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.zip |
coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error message if an
unknown reloc is encountered.
(alpha_relocate_section): Likewise.
ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc with a missing
howto field.
Diffstat (limited to 'bfd/ecoff.c')
-rw-r--r-- | bfd/ecoff.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 89385518d13..cf2658a4c9b 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -2633,6 +2633,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) reloc_ptr_ptr = current->orelocation; reloc_end = reloc_ptr_ptr + current->reloc_count; out_ptr = (char *) reloc_buff; + for (; reloc_ptr_ptr < reloc_end; reloc_ptr_ptr++, out_ptr += external_reloc_size) @@ -2646,6 +2647,11 @@ _bfd_ecoff_write_object_contents (bfd *abfd) reloc = *reloc_ptr_ptr; sym = *reloc->sym_ptr_ptr; + /* If the howto field has not been initialised then skip this reloc. + This assumes that an error message has been issued elsewhere. */ + if (reloc->howto == NULL) + continue; + in.r_vaddr = (reloc->address + bfd_get_section_vma (abfd, current)); in.r_type = reloc->howto->type; |