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 | 1fe494a57221726e49417427cbb2cde8516d9a6f (patch) | |
tree | acf2cbc468dc985ce4ca78f0fc38b94dd58f40c9 /bfd/elf32-arm.h | |
parent | 0ab71ce35ae2c5ef6dfa88af81d5b45b00ec6c7a (diff) | |
download | gdb-1fe494a57221726e49417427cbb2cde8516d9a6f.zip gdb-1fe494a57221726e49417427cbb2cde8516d9a6f.tar.gz gdb-1fe494a57221726e49417427cbb2cde8516d9a6f.tar.bz2 |
Use bfd_generic_verify_endian_match() and fix it to only check when endianness
is known.
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r-- | bfd/elf32-arm.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index a666293..fce2331 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -2007,25 +2007,14 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) flagword out_flags; flagword in_flags; + /* Check if we have the same endianess */ + 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) return true; - /* Check if we have the same endianess */ - if ( ibfd->xvec->byteorder != obfd->xvec->byteorder - && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN - && ibfd->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"); - - bfd_set_error (bfd_error_wrong_format); - return false; - } - /* The input BFD must have had its flags initialised. */ /* The following seems bogus to me -- The flags are initialized in the assembler but I don't think an elf_flags_init field is |