diff options
author | Nick Clifton <nickc@redhat.com> | 2000-05-22 18:44:02 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-05-22 18:44:02 +0000 |
commit | 3829379095a7f765e206953e28feca6bea36af4e (patch) | |
tree | cfc0132850ed034905a50f21ca869488493ece03 /bfd/libbfd.c | |
parent | 59cd6911528a54146d76120c5e9c52a1b12e5f34 (diff) | |
download | gdb-3829379095a7f765e206953e28feca6bea36af4e.tar.gz |
Use bfd_generic_verify_endian_match() and fix it to only check when endianness
is known.
Diffstat (limited to 'bfd/libbfd.c')
-rw-r--r-- | bfd/libbfd.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c index 881af73239f..1bc0f33ee12 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -1306,13 +1306,17 @@ _bfd_generic_verify_endian_match (ibfd, obfd) bfd *obfd; { if (ibfd->xvec->byteorder != obfd->xvec->byteorder + && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) { - (*_bfd_error_handler) - ("%s: compiled for a %s endian system and target is %s endian", - bfd_get_filename (ibfd), - bfd_big_endian (ibfd) ? "big" : "little", - bfd_big_endian (obfd) ? "big" : "little"); + const char *msg; + + if (bfd_big_endian (ibfd)) + msg = _("%s: compiled for a big endian system and target is little endian"); + else + msg = _("%s: compiled for a little endian system and target is big endian"); + + (*_bfd_error_handler) (msg, bfd_get_filename (ibfd)); bfd_set_error (bfd_error_wrong_format); return false; |