diff options
author | Nick Clifton <nickc@redhat.com> | 1999-05-07 07:44:11 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-05-07 07:44:11 +0000 |
commit | 4fa7446da054ab5b62a5d62c8eb8777e86d76748 (patch) | |
tree | 5af9ba9cc0e5a212be37f8bce95c9be4ddd81f4d /bfd/coff-mcore.c | |
parent | 954d320adab760cdcd81263074ea12ec94b3fc27 (diff) | |
download | binutils-redhat-4fa7446da054ab5b62a5d62c8eb8777e86d76748.tar.gz |
Replace assert (about endianism) with an error message
Diffstat (limited to 'bfd/coff-mcore.c')
-rw-r--r-- | bfd/coff-mcore.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c index d787096e37..0180517eea 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; |