diff options
author | Ian Lance Taylor <ian@airs.com> | 2001-05-08 17:44:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2001-05-08 17:44:00 +0000 |
commit | 8e191bd38c2b1af169a1feef527753fb9791706a (patch) | |
tree | bd5e5504d469311761dfd8f0deb7ba4d4e752ab7 /bfd | |
parent | efcbd82c36b75dc6c2d05f5dd3ebd28a269abe4a (diff) | |
download | fsf-binutils-gdb-8e191bd38c2b1af169a1feef527753fb9791706a.zip fsf-binutils-gdb-8e191bd38c2b1af169a1feef527753fb9791706a.tar.gz fsf-binutils-gdb-8e191bd38c2b1af169a1feef527753fb9791706a.tar.bz2 |
* coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
NULL or is not COFF.
(coff_i386_rtype_to_howto): Don't dump core if output section
owner is not COFF.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/coff-i386.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 37d444f..ac6e8b0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2001-05-08 Ian Lance Taylor <ian@zembu.com> + + * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is + NULL or is not COFF. + (coff_i386_rtype_to_howto): Don't dump core if output section + owner is not COFF. + 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de> * ecoff.c (bfd_debug_section): Fix initialization. diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index d35e2ca..7d4ab5a 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -129,7 +129,9 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, #ifdef COFF_WITH_PE /* FIXME: How should this case be handled? */ - if (reloc_entry->howto->type == R_IMAGEBASE) + if (reloc_entry->howto->type == R_IMAGEBASE + && output_bfd != NULL + && bfd_get_flavour(output_bfd) == bfd_target_coff_flavour) diff -= pe_data (output_bfd)->pe_opthdr.ImageBase; #endif @@ -489,7 +491,9 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp) *addendp -= sym->n_value; } - if (rel->r_type == R_IMAGEBASE) + if (rel->r_type == R_IMAGEBASE + && (bfd_get_flavour(sec->output_section->owner) + == bfd_target_coff_flavour)) { *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase; } |