summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-13 02:36:17 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-13 02:36:17 +0000
commitb0ada65f83666487d2f09c7153b28b38fdbbfcd4 (patch)
tree679f7c45d9b77d28a4a462f2a77a108686c9c4f1
parent68c4e687bc1c330f12f612a3d89f1becaf761c5b (diff)
Fixup the recent ELF loader changes which were toast ...
-rw-r--r--arch/mips64/kernel/binfmt_elf32.c6
-rw-r--r--include/asm-mips/elf.h3
-rw-r--r--include/asm-mips64/elf.h3
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips64/kernel/binfmt_elf32.c b/arch/mips64/kernel/binfmt_elf32.c
index a199839a6..fd68241f4 100644
--- a/arch/mips64/kernel/binfmt_elf32.c
+++ b/arch/mips64/kernel/binfmt_elf32.c
@@ -1,5 +1,4 @@
-/* $Id: binfmt_elf32.c,v 1.1 1999/11/24 06:56:13 ralf Exp $
- *
+/*
* Support for 32-bit Linux/MIPS ELF binaries.
*
* Copyright (C) 1999 Ralf Baechle
@@ -28,7 +27,8 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
-#define elf_check_arch(x) ((x) == EM_MIPS || (x) == EM_MIPS_RS4_BE)
+#define elf_check_arch(x) \
+ ((x)->e_machine == EM_MIPS || (x)->e_machine == EM_MIPS_RS4_BE)
#define TASK32_SIZE 0x80000000UL
#undef ELF_ET_DYN_BASE
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h
index 732ea22ea..94f79a21f 100644
--- a/include/asm-mips/elf.h
+++ b/include/asm-mips/elf.h
@@ -23,7 +23,8 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
int __res = 0; \
struct elfhdr *__h = (hdr); \
\
- if ((__h->e_machine != EM_MIPS) && (__h->e_machine != EM_MIPS)) \
+ if ((__h->e_machine != EM_MIPS) && \
+ (__h->e_machine != EM_MIPS_RS4_BE)) \
__res = -ENOEXEC; \
if (__h->e_flags & EF_MIPS_ARCH) \
__res = -ENOEXEC; \
diff --git a/include/asm-mips64/elf.h b/include/asm-mips64/elf.h
index 429c80561..292ab00f5 100644
--- a/include/asm-mips64/elf.h
+++ b/include/asm-mips64/elf.h
@@ -29,7 +29,8 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
int __res = 0; \
struct elfhdr *__h = (hdr); \
\
- if ((__h->e_machine != EM_MIPS) && (__h->e_machine != EM_MIPS)) \
+ if ((__h->e_machine != EM_MIPS) && \
+ (__h->e_machine != EM_MIPS_RS4_BE)) \
__res = -ENOEXEC; \
if (sizeof(elf_caddr_t) == 8 && \
__h->e_ident[EI_CLASS] == ELFCLASS32) \