From: Maciej W. Rozycki Date: Mon, 3 Dec 2012 16:33:13 +0000 (+0000) Subject: * elf32-mips.c (mips_elf32_object_p): Return right away when the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd2bed3aca01316302ddbb34b530e20761265e8e;p=binutils-gdb.git * elf32-mips.c (mips_elf32_object_p): Return right away when the ABI is not compatible. * elfn32-mips.c (mips_elf_n32_object_p): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 90804e5c5c1..c81c96adf7a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-12-03 Maciej W. Rozycki + + * elf32-mips.c (mips_elf32_object_p): Return right away when the + ABI is not compatible. + * elfn32-mips.c (mips_elf_n32_object_p): Likewise. + 2012-12-03 Maciej W. Rozycki * elf32-tilepro.c (tilepro_elf_mkobject): New function. diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index c2bc0da3870..18eb6436909 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -2145,18 +2145,17 @@ mips_elf32_object_p (bfd *abfd) { unsigned long mach; + if (ABI_N32_P (abfd)) + return FALSE; + /* Irix 5 and 6 are broken. Object file symbol tables are not always sorted correctly such that local symbols precede global symbols, and the sh_info field in the symbol table is not always right. */ if (SGI_COMPAT (abfd)) elf_bad_symtab (abfd) = TRUE; - if (ABI_N32_P (abfd)) - return FALSE; - mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags); bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; } diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 7c3ca7d8d60..08c8e5faecf 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -3165,6 +3165,9 @@ mips_elf_n32_object_p (bfd *abfd) { unsigned long mach; + if (!ABI_N32_P (abfd)) + return FALSE; + /* Irix 5 and 6 are broken. Object file symbol tables are not always sorted correctly such that local symbols precede global symbols, and the sh_info field in the symbol table is not always right. */ @@ -3173,10 +3176,6 @@ mips_elf_n32_object_p (bfd *abfd) mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags); bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - - if (! ABI_N32_P(abfd)) - return FALSE; - return TRUE; }