From aa701218b758e960355dd24e5494b22d49a2f3a0 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 7 May 2003 05:09:25 +0000 Subject: [PATCH] * 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. --- bfd/ChangeLog | 6 ++++++ bfd/elfxx-mips.c | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ca2a5d1f5ea..fbb0ad740c9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2003-05-06 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. + 2003-05-05 Alan Modra * elf32-i386.c (allocate_dynrelocs): For undef weak syms with diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 0c3a5d96fca..c889115d116 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -9174,12 +9174,25 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd) /* 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; old_flags = elf_elfheader (obfd)->e_flags; -- 2.30.2