aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-05-07 07:44:11 +0000
committerNick Clifton <nickc@redhat.com>1999-05-07 07:44:11 +0000
commitb23f908b61631f2a173b349e73ad793ac00a887d (patch)
tree78fbdca1929d30748f932a2e2c85cce601a5c522 /bfd
parent71acc4e8d5d721f8de1b35dc06ed36b312f04c95 (diff)
downloadfsf-binutils-gdb-b23f908b61631f2a173b349e73ad793ac00a887d.zip
fsf-binutils-gdb-b23f908b61631f2a173b349e73ad793ac00a887d.tar.gz
fsf-binutils-gdb-b23f908b61631f2a173b349e73ad793ac00a887d.tar.bz2
Replace assert (about endianism) with an error message
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coff-mcore.c15
2 files changed, 18 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9784c1f..891b6b9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+1999-05-07 Nick Clifton <nickc@cygnus.com>
+
+ * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
+ endianism with an error message.
+
Thu May 6 17:09:09 1999 Fred Fish <fnf@be.com>
* dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index d787096..0180517 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -357,8 +357,19 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocateable)
return true;
- BFD_ASSERT (input_bfd->xvec->byteorder
- == output_bfd->xvec->byteorder);
+ /* Check if we have the same endianess */
+ if ( input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
+ && output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
+ {
+ (*_bfd_error_handler)
+ (_("%s: compiled for a %s endian system and target is %s endian.\n"),
+ bfd_get_filename (input_bfd),
+ bfd_big_endian (input_bfd) ? "big" : "little",
+ bfd_big_endian (output_bfd) ? "big" : "little");
+
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
hihalf = false;
hihalf_val = 0;