Index: bfd/ChangeLog from Alexandre Oliva * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve error message for mixing different-endian files. Check for ABI compatibility of input files with the selected emulation. Index: bfd/elfxx-mips.c =================================================================== RCS file: /cvs/uberbaum/bfd/elfxx-mips.c,v retrieving revision 1.51 diff -u -p -r1.51 elfxx-mips.c --- bfd/elfxx-mips.c 12 Apr 2003 08:50:28 -0000 1.51 +++ bfd/elfxx-mips.c 7 May 2003 03:56:28 -0000 @@ -9174,11 +9174,24 @@ _bfd_mips_elf_merge_private_bfd_data (ib /* Check if we have the same endianess */ if (! _bfd_generic_verify_endian_match (ibfd, obfd)) - return FALSE; + { + (*_bfd_error_handler) + (_("%s: endianness incompatible with that of the selected emulation"), + bfd_archive_filename (ibfd)); + return FALSE; + } if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) return TRUE; + + if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0) + { + (*_bfd_error_handler) + (_("%s: ABI is incompatible with that of the selected emulation"), + bfd_archive_filename (ibfd)); + return FALSE; + } new_flags = elf_elfheader (ibfd)->e_flags; elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_NOREORDER;