aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-12-15 19:47:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:12 -0500
commit698ba7b5a3a7be772922340fade365c675b8243f (patch)
tree3e251d4ee8cbd8489d75e7570b2d821395021d59
parentd1da96aada79fd1d29ae4e3157120d1ce1e77594 (diff)
elf: kill USE_ELF_CORE_DUMP
Currently all architectures but microblaze unconditionally define USE_ELF_CORE_DUMP. The microblaze omission seems like an error to me, so let's kill this ifdef and make sure we are the same everywhere. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: <linux-arch@vger.kernel.org> Cc: Michal Simek <michal.simek@petalogix.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/alpha/include/asm/elf.h1
-rw-r--r--arch/arm/include/asm/elf.h1
-rw-r--r--arch/avr32/include/asm/elf.h1
-rw-r--r--arch/blackfin/include/asm/elf.h1
-rw-r--r--arch/cris/include/asm/elf.h2
-rw-r--r--arch/frv/include/asm/elf.h1
-rw-r--r--arch/h8300/include/asm/elf.h1
-rw-r--r--arch/ia64/ia32/elfcore32.h2
-rw-r--r--arch/ia64/include/asm/elf.h1
-rw-r--r--arch/m32r/include/asm/elf.h1
-rw-r--r--arch/m68k/include/asm/elf.h1
-rw-r--r--arch/microblaze/include/asm/elf.h1
-rw-r--r--arch/mips/include/asm/elf.h1
-rw-r--r--arch/mn10300/include/asm/elf.h1
-rw-r--r--arch/parisc/include/asm/elf.h1
-rw-r--r--arch/powerpc/include/asm/elf.h1
-rw-r--r--arch/s390/include/asm/elf.h1
-rw-r--r--arch/score/include/asm/elf.h1
-rw-r--r--arch/sh/include/asm/elf.h1
-rw-r--r--arch/sparc/include/asm/elf_32.h2
-rw-r--r--arch/sparc/include/asm/elf_64.h1
-rw-r--r--arch/um/sys-i386/asm/elf.h1
-rw-r--r--arch/um/sys-ppc/asm/elf.h2
-rw-r--r--arch/um/sys-x86_64/asm/elf.h1
-rw-r--r--arch/x86/include/asm/elf.h1
-rw-r--r--arch/xtensa/include/asm/elf.h1
-rw-r--r--fs/binfmt_elf.c11
-rw-r--r--fs/binfmt_elf_fdpic.c8
-rw-r--r--fs/proc/base.c4
29 files changed, 9 insertions, 44 deletions
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
index 5c75c1b2352a..9baae8afe8a3 100644
--- a/arch/alpha/include/asm/elf.h
+++ b/arch/alpha/include/asm/elf.h
@@ -81,7 +81,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
81#define ELF_DATA ELFDATA2LSB 81#define ELF_DATA ELFDATA2LSB
82#define ELF_ARCH EM_ALPHA 82#define ELF_ARCH EM_ALPHA
83 83
84#define USE_ELF_CORE_DUMP
85#define ELF_EXEC_PAGESIZE 8192 84#define ELF_EXEC_PAGESIZE 8192
86 85
87/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 86/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h
index 6aac3f5bb2f3..a399bb5730f1 100644
--- a/arch/arm/include/asm/elf.h
+++ b/arch/arm/include/asm/elf.h
@@ -101,7 +101,6 @@ extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
101int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); 101int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
102#define ELF_CORE_COPY_TASK_REGS dump_task_regs 102#define ELF_CORE_COPY_TASK_REGS dump_task_regs
103 103
104#define USE_ELF_CORE_DUMP
105#define ELF_EXEC_PAGESIZE 4096 104#define ELF_EXEC_PAGESIZE 4096
106 105
107/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 106/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h
index d5d1d41c600a..3b3159b710d4 100644
--- a/arch/avr32/include/asm/elf.h
+++ b/arch/avr32/include/asm/elf.h
@@ -77,7 +77,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
77#endif 77#endif
78#define ELF_ARCH EM_AVR32 78#define ELF_ARCH EM_AVR32
79 79
80#define USE_ELF_CORE_DUMP
81#define ELF_EXEC_PAGESIZE 4096 80#define ELF_EXEC_PAGESIZE 4096
82 81
83/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 82/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h
index 8e0764c81eaf..5b50f0ecacf8 100644
--- a/arch/blackfin/include/asm/elf.h
+++ b/arch/blackfin/include/asm/elf.h
@@ -55,7 +55,6 @@ do { \
55 _regs->p2 = _dynamic_addr; \ 55 _regs->p2 = _dynamic_addr; \
56} while(0) 56} while(0)
57 57
58#define USE_ELF_CORE_DUMP
59#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC 58#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC
60#define ELF_EXEC_PAGESIZE 4096 59#define ELF_EXEC_PAGESIZE 4096
61 60
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h
index 0f51b10b9f4f..8a3d8e2b33c1 100644
--- a/arch/cris/include/asm/elf.h
+++ b/arch/cris/include/asm/elf.h
@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t;
64#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 64#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
65/* End of excerpt from {binutils}/include/elf/cris.h. */ 65/* End of excerpt from {binutils}/include/elf/cris.h. */
66 66
67#define USE_ELF_CORE_DUMP
68
69#define ELF_EXEC_PAGESIZE 8192 67#define ELF_EXEC_PAGESIZE 8192
70 68
71/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 69/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/frv/include/asm/elf.h b/arch/frv/include/asm/elf.h
index 7bbf6e47f8c8..c3819804a74b 100644
--- a/arch/frv/include/asm/elf.h
+++ b/arch/frv/include/asm/elf.h
@@ -115,7 +115,6 @@ do { \
115 __kernel_frame0_ptr->gr29 = 0; \ 115 __kernel_frame0_ptr->gr29 = 0; \
116} while(0) 116} while(0)
117 117
118#define USE_ELF_CORE_DUMP
119#define CORE_DUMP_USE_REGSET 118#define CORE_DUMP_USE_REGSET
120#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC 119#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
121#define ELF_EXEC_PAGESIZE 16384 120#define ELF_EXEC_PAGESIZE 16384
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h
index 94e2284c8816..c24fa250d653 100644
--- a/arch/h8300/include/asm/elf.h
+++ b/arch/h8300/include/asm/elf.h
@@ -34,7 +34,6 @@ typedef unsigned long elf_fpregset_t;
34 34
35#define ELF_PLAT_INIT(_r) _r->er1 = 0 35#define ELF_PLAT_INIT(_r) _r->er1 = 0
36 36
37#define USE_ELF_CORE_DUMP
38#define ELF_EXEC_PAGESIZE 4096 37#define ELF_EXEC_PAGESIZE 4096
39 38
40/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 39/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h
index 9a3abf58cea3..657725742617 100644
--- a/arch/ia64/ia32/elfcore32.h
+++ b/arch/ia64/ia32/elfcore32.h
@@ -11,8 +11,6 @@
11#include <asm/intrinsics.h> 11#include <asm/intrinsics.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13 13
14#define USE_ELF_CORE_DUMP 1
15
16/* Override elfcore.h */ 14/* Override elfcore.h */
17#define _LINUX_ELFCORE_H 1 15#define _LINUX_ELFCORE_H 1
18typedef unsigned int elf_greg_t; 16typedef unsigned int elf_greg_t;
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h
index 86eddee029cb..e14108b19c09 100644
--- a/arch/ia64/include/asm/elf.h
+++ b/arch/ia64/include/asm/elf.h
@@ -25,7 +25,6 @@
25#define ELF_DATA ELFDATA2LSB 25#define ELF_DATA ELFDATA2LSB
26#define ELF_ARCH EM_IA_64 26#define ELF_ARCH EM_IA_64
27 27
28#define USE_ELF_CORE_DUMP
29#define CORE_DUMP_USE_REGSET 28#define CORE_DUMP_USE_REGSET
30 29
31/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are 30/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h
index 0cc34c94bf2b..2f85412ef730 100644
--- a/arch/m32r/include/asm/elf.h
+++ b/arch/m32r/include/asm/elf.h
@@ -102,7 +102,6 @@ typedef elf_fpreg_t elf_fpregset_t;
102 */ 102 */
103#define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0 103#define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0
104 104
105#define USE_ELF_CORE_DUMP
106#define ELF_EXEC_PAGESIZE PAGE_SIZE 105#define ELF_EXEC_PAGESIZE PAGE_SIZE
107 106
108/* 107/*
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h
index 0b0f49eb876b..01c193d91412 100644
--- a/arch/m68k/include/asm/elf.h
+++ b/arch/m68k/include/asm/elf.h
@@ -59,7 +59,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
59 is actually used on ASV. */ 59 is actually used on ASV. */
60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 60#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
61 61
62#define USE_ELF_CORE_DUMP
63#ifndef CONFIG_SUN3 62#ifndef CONFIG_SUN3
64#define ELF_EXEC_PAGESIZE 4096 63#define ELF_EXEC_PAGESIZE 4096
65#else 64#else
diff --git a/arch/microblaze/include/asm/elf.h b/arch/microblaze/include/asm/elf.h
index f92fc0dda006..7d4acf2b278e 100644
--- a/arch/microblaze/include/asm/elf.h
+++ b/arch/microblaze/include/asm/elf.h
@@ -77,7 +77,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
77#define ELF_DATA ELFDATA2MSB 77#define ELF_DATA ELFDATA2MSB
78#endif 78#endif
79 79
80#define USE_ELF_CORE_DUMP
81#define ELF_EXEC_PAGESIZE 4096 80#define ELF_EXEC_PAGESIZE 4096
82 81
83 82
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 7990694cda22..7a6a35dbe529 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -326,7 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
326#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ 326#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \
327 dump_task_fpu(tsk, elf_fpregs) 327 dump_task_fpu(tsk, elf_fpregs)
328 328
329#define USE_ELF_CORE_DUMP
330#define ELF_EXEC_PAGESIZE PAGE_SIZE 329#define ELF_EXEC_PAGESIZE PAGE_SIZE
331 330
332/* This yields a mask that user programs can use to figure out what 331/* This yields a mask that user programs can use to figure out what
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h
index 75a70aa9fd6f..e5fa97cd9a14 100644
--- a/arch/mn10300/include/asm/elf.h
+++ b/arch/mn10300/include/asm/elf.h
@@ -77,7 +77,6 @@ do { \
77 _ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \ 77 _ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \
78} while (0) 78} while (0)
79 79
80#define USE_ELF_CORE_DUMP
81#define CORE_DUMP_USE_REGSET 80#define CORE_DUMP_USE_REGSET
82#define ELF_EXEC_PAGESIZE 4096 81#define ELF_EXEC_PAGESIZE 4096
83 82
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
index 9c802eb4be84..19f6cb1a4a1c 100644
--- a/arch/parisc/include/asm/elf.h
+++ b/arch/parisc/include/asm/elf.h
@@ -328,7 +328,6 @@ struct pt_regs; /* forward declaration... */
328 such function. */ 328 such function. */
329#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0 329#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0
330 330
331#define USE_ELF_CORE_DUMP
332#define ELF_EXEC_PAGESIZE 4096 331#define ELF_EXEC_PAGESIZE 4096
333 332
334/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 333/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 014a624f4c8e..17828ad411eb 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -170,7 +170,6 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
170#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) 170#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
171#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC) 171#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC)
172 172
173#define USE_ELF_CORE_DUMP
174#define CORE_DUMP_USE_REGSET 173#define CORE_DUMP_USE_REGSET
175#define ELF_EXEC_PAGESIZE PAGE_SIZE 174#define ELF_EXEC_PAGESIZE PAGE_SIZE
176 175
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index e885442c1dfe..354d42616c7e 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -155,7 +155,6 @@ extern unsigned int vdso_enabled;
155 } while (0) 155 } while (0)
156 156
157#define CORE_DUMP_USE_REGSET 157#define CORE_DUMP_USE_REGSET
158#define USE_ELF_CORE_DUMP
159#define ELF_EXEC_PAGESIZE 4096 158#define ELF_EXEC_PAGESIZE 4096
160 159
161/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 160/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h
index 43526d9fda93..f478ce94181f 100644
--- a/arch/score/include/asm/elf.h
+++ b/arch/score/include/asm/elf.h
@@ -61,7 +61,6 @@ struct task_struct;
61struct pt_regs; 61struct pt_regs;
62 62
63#define CORE_DUMP_USE_REGSET 63#define CORE_DUMP_USE_REGSET
64#define USE_ELF_CORE_DUMP
65#define ELF_EXEC_PAGESIZE PAGE_SIZE 64#define ELF_EXEC_PAGESIZE PAGE_SIZE
66 65
67/* This yields a mask that user programs can use to figure out what 66/* This yields a mask that user programs can use to figure out what
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index ccb1d93bb043..ac04255022b6 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -114,7 +114,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
114 */ 114 */
115#define CORE_DUMP_USE_REGSET 115#define CORE_DUMP_USE_REGSET
116 116
117#define USE_ELF_CORE_DUMP
118#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC 117#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC
119#define ELF_EXEC_PAGESIZE PAGE_SIZE 118#define ELF_EXEC_PAGESIZE PAGE_SIZE
120 119
diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h
index 381a1b5256d6..4269ca6ad18a 100644
--- a/arch/sparc/include/asm/elf_32.h
+++ b/arch/sparc/include/asm/elf_32.h
@@ -104,8 +104,6 @@ typedef struct {
104#define ELF_CLASS ELFCLASS32 104#define ELF_CLASS ELFCLASS32
105#define ELF_DATA ELFDATA2MSB 105#define ELF_DATA ELFDATA2MSB
106 106
107#define USE_ELF_CORE_DUMP
108
109#define ELF_EXEC_PAGESIZE 4096 107#define ELF_EXEC_PAGESIZE 4096
110 108
111 109
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index d42e393078c4..ff66bb88537b 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -152,7 +152,6 @@ typedef struct {
152 (x)->e_machine == EM_SPARC32PLUS) 152 (x)->e_machine == EM_SPARC32PLUS)
153#define compat_start_thread start_thread32 153#define compat_start_thread start_thread32
154 154
155#define USE_ELF_CORE_DUMP
156#define ELF_EXEC_PAGESIZE PAGE_SIZE 155#define ELF_EXEC_PAGESIZE PAGE_SIZE
157 156
158/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 157/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/um/sys-i386/asm/elf.h b/arch/um/sys-i386/asm/elf.h
index d0da9d7c5371..770885472ed4 100644
--- a/arch/um/sys-i386/asm/elf.h
+++ b/arch/um/sys-i386/asm/elf.h
@@ -48,7 +48,6 @@ typedef struct user_i387_struct elf_fpregset_t;
48 PT_REGS_EAX(regs) = 0; \ 48 PT_REGS_EAX(regs) = 0; \
49} while (0) 49} while (0)
50 50
51#define USE_ELF_CORE_DUMP
52#define ELF_EXEC_PAGESIZE 4096 51#define ELF_EXEC_PAGESIZE 4096
53 52
54#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 53#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
diff --git a/arch/um/sys-ppc/asm/elf.h b/arch/um/sys-ppc/asm/elf.h
index af9463cd8ce5..8aacaf56508d 100644
--- a/arch/um/sys-ppc/asm/elf.h
+++ b/arch/um/sys-ppc/asm/elf.h
@@ -17,8 +17,6 @@ extern long elf_aux_hwcap;
17#define ELF_CLASS ELFCLASS32 17#define ELF_CLASS ELFCLASS32
18#endif 18#endif
19 19
20#define USE_ELF_CORE_DUMP
21
22#define R_386_NONE 0 20#define R_386_NONE 0
23#define R_386_32 1 21#define R_386_32 1
24#define R_386_PC32 2 22#define R_386_PC32 2
diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h
index 04b9e87c8dad..49655c83efd2 100644
--- a/arch/um/sys-x86_64/asm/elf.h
+++ b/arch/um/sys-x86_64/asm/elf.h
@@ -104,7 +104,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
104 clear_thread_flag(TIF_IA32); 104 clear_thread_flag(TIF_IA32);
105#endif 105#endif
106 106
107#define USE_ELF_CORE_DUMP
108#define ELF_EXEC_PAGESIZE 4096 107#define ELF_EXEC_PAGESIZE 4096
109 108
110#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) 109#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 8a024babe5e6..b4501ee223ad 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -239,7 +239,6 @@ extern int force_personality32;
239#endif /* !CONFIG_X86_32 */ 239#endif /* !CONFIG_X86_32 */
240 240
241#define CORE_DUMP_USE_REGSET 241#define CORE_DUMP_USE_REGSET
242#define USE_ELF_CORE_DUMP
243#define ELF_EXEC_PAGESIZE 4096 242#define ELF_EXEC_PAGESIZE 4096
244 243
245/* This is the location that an ET_DYN program is loaded if exec'ed. Typical 244/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
diff --git a/arch/xtensa/include/asm/elf.h b/arch/xtensa/include/asm/elf.h
index c3f53e755ca5..5eb6d695e987 100644
--- a/arch/xtensa/include/asm/elf.h
+++ b/arch/xtensa/include/asm/elf.h
@@ -123,7 +123,6 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
123#define ELF_CLASS ELFCLASS32 123#define ELF_CLASS ELFCLASS32
124#define ELF_ARCH EM_XTENSA 124#define ELF_ARCH EM_XTENSA
125 125
126#define USE_ELF_CORE_DUMP
127#define ELF_EXEC_PAGESIZE PAGE_SIZE 126#define ELF_EXEC_PAGESIZE PAGE_SIZE
128 127
129/* 128/*
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index d15ea1790bfb..97b6e9efeb7f 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -44,7 +44,7 @@ static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *,
44 * If we don't support core dumping, then supply a NULL so we 44 * If we don't support core dumping, then supply a NULL so we
45 * don't even try. 45 * don't even try.
46 */ 46 */
47#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 47#ifdef CONFIG_ELF_CORE
48static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); 48static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
49#else 49#else
50#define elf_core_dump NULL 50#define elf_core_dump NULL
@@ -1101,12 +1101,7 @@ out:
1101 return error; 1101 return error;
1102} 1102}
1103 1103
1104/* 1104#ifdef CONFIG_ELF_CORE
1105 * Note that some platforms still use traditional core dumps and not
1106 * the ELF core dump. Each platform can select it as appropriate.
1107 */
1108#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
1109
1110/* 1105/*
1111 * ELF core dumper 1106 * ELF core dumper
1112 * 1107 *
@@ -2063,7 +2058,7 @@ out:
2063 return has_dumped; 2058 return has_dumped;
2064} 2059}
2065 2060
2066#endif /* USE_ELF_CORE_DUMP */ 2061#endif /* CONFIG_ELF_CORE */
2067 2062
2068static int __init init_elf_binfmt(void) 2063static int __init init_elf_binfmt(void)
2069{ 2064{
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 79d2b1aa389f..7b055385db8e 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -75,14 +75,14 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *,
75static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *, 75static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *,
76 struct file *, struct mm_struct *); 76 struct file *, struct mm_struct *);
77 77
78#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 78#ifdef CONFIG_ELF_CORE
79static int elf_fdpic_core_dump(long, struct pt_regs *, struct file *, unsigned long limit); 79static int elf_fdpic_core_dump(long, struct pt_regs *, struct file *, unsigned long limit);
80#endif 80#endif
81 81
82static struct linux_binfmt elf_fdpic_format = { 82static struct linux_binfmt elf_fdpic_format = {
83 .module = THIS_MODULE, 83 .module = THIS_MODULE,
84 .load_binary = load_elf_fdpic_binary, 84 .load_binary = load_elf_fdpic_binary,
85#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 85#ifdef CONFIG_ELF_CORE
86 .core_dump = elf_fdpic_core_dump, 86 .core_dump = elf_fdpic_core_dump,
87#endif 87#endif
88 .min_coredump = ELF_EXEC_PAGESIZE, 88 .min_coredump = ELF_EXEC_PAGESIZE,
@@ -1201,7 +1201,7 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
1201 * 1201 *
1202 * Modelled on fs/binfmt_elf.c core dumper 1202 * Modelled on fs/binfmt_elf.c core dumper
1203 */ 1203 */
1204#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 1204#ifdef CONFIG_ELF_CORE
1205 1205
1206/* 1206/*
1207 * These are the only things you should do on a core-file: use only these 1207 * These are the only things you should do on a core-file: use only these
@@ -1826,4 +1826,4 @@ cleanup:
1826#undef NUM_NOTES 1826#undef NUM_NOTES
1827} 1827}
1828 1828
1829#endif /* USE_ELF_CORE_DUMP */ 1829#endif /* CONFIG_ELF_CORE */
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 4df4a464a919..18d5cc62d8ed 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2266,7 +2266,7 @@ static const struct inode_operations proc_attr_dir_inode_operations = {
2266 2266
2267#endif 2267#endif
2268 2268
2269#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 2269#ifdef CONFIG_ELF_CORE
2270static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf, 2270static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf,
2271 size_t count, loff_t *ppos) 2271 size_t count, loff_t *ppos)
2272{ 2272{
@@ -2623,7 +2623,7 @@ static const struct pid_entry tgid_base_stuff[] = {
2623#ifdef CONFIG_FAULT_INJECTION 2623#ifdef CONFIG_FAULT_INJECTION
2624 REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations), 2624 REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
2625#endif 2625#endif
2626#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE) 2626#ifdef CONFIG_ELF_CORE
2627 REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations), 2627 REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),
2628#endif 2628#endif
2629#ifdef CONFIG_TASK_IO_ACCOUNTING 2629#ifdef CONFIG_TASK_IO_ACCOUNTING