]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
elf: kill USE_ELF_CORE_DUMP
authorChristoph Hellwig <hch@lst.de>
Wed, 16 Dec 2009 00:47:37 +0000 (16:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:12 +0000 (07:20 -0800)
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>
29 files changed:
arch/alpha/include/asm/elf.h
arch/arm/include/asm/elf.h
arch/avr32/include/asm/elf.h
arch/blackfin/include/asm/elf.h
arch/cris/include/asm/elf.h
arch/frv/include/asm/elf.h
arch/h8300/include/asm/elf.h
arch/ia64/ia32/elfcore32.h
arch/ia64/include/asm/elf.h
arch/m32r/include/asm/elf.h
arch/m68k/include/asm/elf.h
arch/microblaze/include/asm/elf.h
arch/mips/include/asm/elf.h
arch/mn10300/include/asm/elf.h
arch/parisc/include/asm/elf.h
arch/powerpc/include/asm/elf.h
arch/s390/include/asm/elf.h
arch/score/include/asm/elf.h
arch/sh/include/asm/elf.h
arch/sparc/include/asm/elf_32.h
arch/sparc/include/asm/elf_64.h
arch/um/sys-i386/asm/elf.h
arch/um/sys-ppc/asm/elf.h
arch/um/sys-x86_64/asm/elf.h
arch/x86/include/asm/elf.h
arch/xtensa/include/asm/elf.h
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/proc/base.c

index 5c75c1b2352a9cacf7c47de5c04d57b1bab7211b..9baae8afe8a372d20e88537691fc555d8dd6bb6d 100644 (file)
@@ -81,7 +81,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 #define ELF_DATA       ELFDATA2LSB
 #define ELF_ARCH       EM_ALPHA
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      8192
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 6aac3f5bb2f3ee1975f53578d2742a5e5d1295b9..a399bb5730f15210aa2b6b42527ea6ada7d19f15 100644 (file)
@@ -101,7 +101,6 @@ extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
 int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
 #define ELF_CORE_COPY_TASK_REGS dump_task_regs
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index d5d1d41c600a81e6eea29bd07967fa2412ffce14..3b3159b710d42de528b487bc9758cf04dfb9a7fa 100644 (file)
@@ -77,7 +77,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
 #endif
 #define ELF_ARCH       EM_AVR32
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 8e0764c81eaf18df6d2e0ee0167596b2fdea5e25..5b50f0ecacf8ebd77c0e4646c397fb2356034d80 100644 (file)
@@ -55,7 +55,6 @@ do {                                                                                  \
        _regs->p2       = _dynamic_addr;                                \
 } while(0)
 
-#define USE_ELF_CORE_DUMP
 #define ELF_FDPIC_CORE_EFLAGS  EF_BFIN_FDPIC
 #define ELF_EXEC_PAGESIZE      4096
 
index 0f51b10b9f4f39b397f5615377e229268a13df9e..8a3d8e2b33c1e41c384255ecb764cee17af4a3c4 100644 (file)
@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t;
 #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
 /* End of excerpt from {binutils}/include/elf/cris.h.  */
 
-#define USE_ELF_CORE_DUMP
-
 #define ELF_EXEC_PAGESIZE      8192
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 7bbf6e47f8c8a5cb216c9b8f5e0b8be3b902c5bb..c3819804a74b104765c60a16051ffeea4063cbb1 100644 (file)
@@ -115,7 +115,6 @@ do {                                                                                        \
        __kernel_frame0_ptr->gr29       = 0;                                            \
 } while(0)
 
-#define USE_ELF_CORE_DUMP
 #define CORE_DUMP_USE_REGSET
 #define ELF_FDPIC_CORE_EFLAGS  EF_FRV_FDPIC
 #define ELF_EXEC_PAGESIZE      16384
index 94e2284c88168fba8a42afc0008aa8cb1c53944e..c24fa250d6533cdb3a5429c102323ca19d356e0d 100644 (file)
@@ -34,7 +34,6 @@ typedef unsigned long elf_fpregset_t;
 
 #define ELF_PLAT_INIT(_r)      _r->er1 = 0
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 9a3abf58cea34580edc399f25d6d2750198214f7..6577257426176a4163db634bb7d4b4643a6203db 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/intrinsics.h>
 #include <asm/uaccess.h>
 
-#define USE_ELF_CORE_DUMP 1
-
 /* Override elfcore.h */
 #define _LINUX_ELFCORE_H 1
 typedef unsigned int elf_greg_t;
index 86eddee029cb5238c00d4de2ef1c432f37e97e6d..e14108b19c091a654eb2a28cbf45ff104efa5ace 100644 (file)
@@ -25,7 +25,6 @@
 #define ELF_DATA       ELFDATA2LSB
 #define ELF_ARCH       EM_IA_64
 
-#define USE_ELF_CORE_DUMP
 #define CORE_DUMP_USE_REGSET
 
 /* Least-significant four bits of ELF header's e_flags are OS-specific.  The bits are
index 0cc34c94bf2bf26a087a73a11ea32302d48eebf6..2f85412ef7302a0aedaf1b5e26f63719c69dc033 100644 (file)
@@ -102,7 +102,6 @@ typedef elf_fpreg_t elf_fpregset_t;
  */
 #define ELF_PLAT_INIT(_r, load_addr)   (_r)->r0 = 0
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
 /*
index 0b0f49eb876b11db0ce7eb6cd1703be2657fbd54..01c193d9141268c5f65ea1720ba1ecdd1db9d726 100644 (file)
@@ -59,7 +59,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
    is actually used on ASV.  */
 #define ELF_PLAT_INIT(_r, load_addr)   _r->a1 = 0
 
-#define USE_ELF_CORE_DUMP
 #ifndef CONFIG_SUN3
 #define ELF_EXEC_PAGESIZE      4096
 #else
index f92fc0dda006d40b886d36b947bb3891cb83656a..7d4acf2b278e2061c9d73d9ef4b86faf09620e8a 100644 (file)
@@ -77,7 +77,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 #define ELF_DATA       ELFDATA2MSB
 #endif
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 
index 7990694cda221dbd9f0da1c2b11b4f8e77688680..7a6a35dbe529c91ad71529e5d77218811be556cf 100644 (file)
@@ -326,7 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs)                  \
        dump_task_fpu(tsk, elf_fpregs)
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
 /* This yields a mask that user programs can use to figure out what
index 75a70aa9fd6f0da2ca9b7630f588c9bff91b1f38..e5fa97cd9a147222c567b39f1e8bd01cec18ff4a 100644 (file)
@@ -77,7 +77,6 @@ do {                                                                  \
        _ur->a1   = 0;  _ur->a0   = 0;  _ur->d1   = 0;  _ur->d0   = 0;  \
 } while (0)
 
-#define USE_ELF_CORE_DUMP
 #define CORE_DUMP_USE_REGSET
 #define ELF_EXEC_PAGESIZE      4096
 
index 9c802eb4be8491e95f932c9efb487f4b751ac5d4..19f6cb1a4a1c1aa06dd5abcaa4fd7c129863d5b1 100644 (file)
@@ -328,7 +328,6 @@ struct pt_regs;     /* forward declaration... */
    such function.  */
 #define ELF_PLAT_INIT(_r, load_addr)       _r->gr[23] = 0
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 014a624f4c8efb054bd46da4e5711713b3e76b68..17828ad411ebbecdb920a1cbdd8ee44886b669af 100644 (file)
@@ -170,7 +170,6 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
 #define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
 #define compat_elf_check_arch(x)       ((x)->e_machine == EM_PPC)
 
-#define USE_ELF_CORE_DUMP
 #define CORE_DUMP_USE_REGSET
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
index e885442c1dfe99622217a06444ed680c18b23303..354d42616c7e6dc057a4bbf1bbfbb80805f7d880 100644 (file)
@@ -155,7 +155,6 @@ extern unsigned int vdso_enabled;
        } while (0)
 
 #define CORE_DUMP_USE_REGSET
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index 43526d9fda936b07bd22c031b50dc30189cb598b..f478ce94181fb349324bf836e9fe5a01abfaa13d 100644 (file)
@@ -61,7 +61,6 @@ struct task_struct;
 struct pt_regs;
 
 #define CORE_DUMP_USE_REGSET
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
 /* This yields a mask that user programs can use to figure out what
index ccb1d93bb04361678b967fd80151c43427263b27..ac04255022b69548e6f71f07f0502e97664c881f 100644 (file)
@@ -114,7 +114,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
  */
 #define CORE_DUMP_USE_REGSET
 
-#define USE_ELF_CORE_DUMP
 #define ELF_FDPIC_CORE_EFLAGS  EF_SH_FDPIC
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
index 381a1b5256d6c9f23e0cb683b90ba8307265a409..4269ca6ad18a9f2b46cb0064dcc9618e9d72dcb3 100644 (file)
@@ -104,8 +104,6 @@ typedef struct {
 #define ELF_CLASS      ELFCLASS32
 #define ELF_DATA       ELFDATA2MSB
 
-#define USE_ELF_CORE_DUMP
-
 #define ELF_EXEC_PAGESIZE      4096
 
 
index d42e393078c49c4cdda59392fdbd56dc1d6f6c6e..ff66bb88537b37539812173a7825d1da39a82810 100644 (file)
@@ -152,7 +152,6 @@ typedef struct {
                                         (x)->e_machine == EM_SPARC32PLUS)
 #define compat_start_thread            start_thread32
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index d0da9d7c53716fc294fd1d1c26759d03da784469..770885472ed4c850b59d5fea34ad1c0c5db1439f 100644 (file)
@@ -48,7 +48,6 @@ typedef struct user_i387_struct elf_fpregset_t;
        PT_REGS_EAX(regs) = 0; \
 } while (0)
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE 4096
 
 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
index af9463cd8ce51f936af61c14d8ce217bf3eb5eec..8aacaf56508d408e425054e5991aeab78d8d9f9b 100644 (file)
@@ -17,8 +17,6 @@ extern long elf_aux_hwcap;
 #define ELF_CLASS ELFCLASS32
 #endif
 
-#define USE_ELF_CORE_DUMP
-
 #define R_386_NONE     0
 #define R_386_32       1
 #define R_386_PC32     2
index 04b9e87c8dadd38f5f0ebc60ae72b190e63c7920..49655c83efd2241b4d80b044b283207a3a3493ec 100644 (file)
@@ -104,7 +104,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
         clear_thread_flag(TIF_IA32);
 #endif
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE 4096
 
 #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
index 8a024babe5e646a3b1f8282deeae9edcf70088ba..b4501ee223ad66e4e589d1340aee77b483e8da7c 100644 (file)
@@ -239,7 +239,6 @@ extern int force_personality32;
 #endif /* !CONFIG_X86_32 */
 
 #define CORE_DUMP_USE_REGSET
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
 
 /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
index c3f53e755ca5c16fabff550b1c7859c6521c9e17..5eb6d695e9872563ab9cd14a2cf67b2a9ad142bc 100644 (file)
@@ -123,7 +123,6 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
 #define ELF_CLASS      ELFCLASS32
 #define ELF_ARCH       EM_XTENSA
 
-#define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
 /*
index d15ea1790bfb8f8780f53aa055663895166d91a8..97b6e9efeb7f356296ed03d5f1a9f4762067ce6b 100644 (file)
@@ -44,7 +44,7 @@ static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *,
  * If we don't support core dumping, then supply a NULL so we
  * don't even try.
  */
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
 static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
 #else
 #define elf_core_dump  NULL
@@ -1101,12 +1101,7 @@ out:
        return error;
 }
 
-/*
- * Note that some platforms still use traditional core dumps and not
- * the ELF core dump.  Each platform can select it as appropriate.
- */
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
-
+#ifdef CONFIG_ELF_CORE
 /*
  * ELF core dumper
  *
@@ -2063,7 +2058,7 @@ out:
        return has_dumped;
 }
 
-#endif         /* USE_ELF_CORE_DUMP */
+#endif         /* CONFIG_ELF_CORE */
 
 static int __init init_elf_binfmt(void)
 {
index 79d2b1aa389f656f4952335955ab7bae89e41fa0..7b055385db8ee8a341bb1af9ed63859523324f2f 100644 (file)
@@ -75,14 +75,14 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *,
 static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *,
                                             struct file *, struct mm_struct *);
 
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
 static int elf_fdpic_core_dump(long, struct pt_regs *, struct file *, unsigned long limit);
 #endif
 
 static struct linux_binfmt elf_fdpic_format = {
        .module         = THIS_MODULE,
        .load_binary    = load_elf_fdpic_binary,
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
        .core_dump      = elf_fdpic_core_dump,
 #endif
        .min_coredump   = ELF_EXEC_PAGESIZE,
@@ -1201,7 +1201,7 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params,
  *
  * Modelled on fs/binfmt_elf.c core dumper
  */
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
 
 /*
  * These are the only things you should do on a core-file: use only these
@@ -1826,4 +1826,4 @@ cleanup:
 #undef NUM_NOTES
 }
 
-#endif         /* USE_ELF_CORE_DUMP */
+#endif         /* CONFIG_ELF_CORE */
index 4df4a464a919c2ed372b4e93d742216d51692066..18d5cc62d8ed92ebefb2a85cb26642ecc78d796d 100644 (file)
@@ -2266,7 +2266,7 @@ static const struct inode_operations proc_attr_dir_inode_operations = {
 
 #endif
 
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
 static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf,
                                         size_t count, loff_t *ppos)
 {
@@ -2623,7 +2623,7 @@ static const struct pid_entry tgid_base_stuff[] = {
 #ifdef CONFIG_FAULT_INJECTION
        REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
 #endif
-#if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
+#ifdef CONFIG_ELF_CORE
        REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),
 #endif
 #ifdef CONFIG_TASK_IO_ACCOUNTING