summaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-05-22 18:44:02 +0000
committerNick Clifton <nickc@redhat.com>2000-05-22 18:44:02 +0000
commit3829379095a7f765e206953e28feca6bea36af4e (patch)
treecfc0132850ed034905a50f21ca869488493ece03 /bfd/elf32-mips.c
parent59cd6911528a54146d76120c5e9c52a1b12e5f34 (diff)
downloadgdb-3829379095a7f765e206953e28feca6bea36af4e.tar.gz
Use bfd_generic_verify_endian_match() and fix it to only check when endianness
is known.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c1506e18b27..4892d5afd3d 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -2460,21 +2460,8 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
boolean ok;
/* Check if we have the same endianess */
- if (ibfd->xvec->byteorder != obfd->xvec->byteorder
- && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
- {
- 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;
- }
+ if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+ return false;
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)