aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-12-03 16:33:13 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-12-03 16:33:13 +0000
commitdd2bed3aca01316302ddbb34b530e20761265e8e (patch)
treec8fec5017be985d1847ccd6fd172fdf1c242a685
parenta412bee57b96910b7b1e05d9db816a81224a3907 (diff)
downloadfsf-binutils-gdb-dd2bed3aca01316302ddbb34b530e20761265e8e.zip
fsf-binutils-gdb-dd2bed3aca01316302ddbb34b530e20761265e8e.tar.gz
fsf-binutils-gdb-dd2bed3aca01316302ddbb34b530e20761265e8e.tar.bz2
* 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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-mips.c7
-rw-r--r--bfd/elfn32-mips.c7
3 files changed, 12 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 90804e5..c81c96a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
+ * 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 <macro@codesourcery.com>
+
* elf32-tilepro.c (tilepro_elf_mkobject): New function.
(bfd_elf32_mkobject): New macro.
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index c2bc0da..18eb643 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 7c3ca7d..08c8e5f 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;
}