diff options
Diffstat (limited to 'arch/mips/kernel/binfmt_elfo32.c')
-rw-r--r-- | arch/mips/kernel/binfmt_elfo32.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index e1333d7319e2..ff448233dab5 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
@@ -53,6 +53,23 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) | 53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) |
54 | 54 | ||
55 | #include <asm/processor.h> | 55 | #include <asm/processor.h> |
56 | |||
57 | /* | ||
58 | * When this file is selected, we are definitely running a 64bit kernel. | ||
59 | * So using the right regs define in asm/reg.h | ||
60 | */ | ||
61 | #define WANT_COMPAT_REG_H | ||
62 | |||
63 | /* These MUST be defined before elf.h gets included */ | ||
64 | extern void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs); | ||
65 | #define ELF_CORE_COPY_REGS(_dest, _regs) elf32_core_copy_regs(_dest, _regs); | ||
66 | #define ELF_CORE_COPY_TASK_REGS(_tsk, _dest) \ | ||
67 | ({ \ | ||
68 | int __res = 1; \ | ||
69 | elf32_core_copy_regs(*(_dest), task_pt_regs(_tsk)); \ | ||
70 | __res; \ | ||
71 | }) | ||
72 | |||
56 | #include <linux/module.h> | 73 | #include <linux/module.h> |
57 | #include <linux/elfcore.h> | 74 | #include <linux/elfcore.h> |
58 | #include <linux/compat.h> | 75 | #include <linux/compat.h> |
@@ -110,9 +127,6 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
110 | value->tv_usec = rem / NSEC_PER_USEC; | 127 | value->tv_usec = rem / NSEC_PER_USEC; |
111 | } | 128 | } |
112 | 129 | ||
113 | #undef ELF_CORE_COPY_REGS | ||
114 | #define ELF_CORE_COPY_REGS(_dest, _regs) elf32_core_copy_regs(_dest, _regs); | ||
115 | |||
116 | void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs) | 130 | void elf32_core_copy_regs(elf_gregset_t grp, struct pt_regs *regs) |
117 | { | 131 | { |
118 | int i; | 132 | int i; |