Commit 698ba7b5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

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: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarHugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: <linux-arch@vger.kernel.org>
Cc: Michal Simek <michal.simek@petalogix.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d1da96aa
...@@ -81,7 +81,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ...@@ -81,7 +81,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define ELF_DATA ELFDATA2LSB #define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_ALPHA #define ELF_ARCH EM_ALPHA
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 8192 #define ELF_EXEC_PAGESIZE 8192
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -101,7 +101,6 @@ extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int); ...@@ -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); int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
#define ELF_CORE_COPY_TASK_REGS dump_task_regs #define ELF_CORE_COPY_TASK_REGS dump_task_regs
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -77,7 +77,6 @@ typedef struct user_fpu_struct elf_fpregset_t; ...@@ -77,7 +77,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
#endif #endif
#define ELF_ARCH EM_AVR32 #define ELF_ARCH EM_AVR32
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -55,7 +55,6 @@ do { \ ...@@ -55,7 +55,6 @@ do { \
_regs->p2 = _dynamic_addr; \ _regs->p2 = _dynamic_addr; \
} while(0) } while(0)
#define USE_ELF_CORE_DUMP
#define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC #define ELF_FDPIC_CORE_EFLAGS EF_BFIN_FDPIC
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
......
...@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t; ...@@ -64,8 +64,6 @@ typedef unsigned long elf_fpregset_t;
#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004 #define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
/* End of excerpt from {binutils}/include/elf/cris.h. */ /* End of excerpt from {binutils}/include/elf/cris.h. */
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 8192 #define ELF_EXEC_PAGESIZE 8192
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -115,7 +115,6 @@ do { \ ...@@ -115,7 +115,6 @@ do { \
__kernel_frame0_ptr->gr29 = 0; \ __kernel_frame0_ptr->gr29 = 0; \
} while(0) } while(0)
#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC #define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
#define ELF_EXEC_PAGESIZE 16384 #define ELF_EXEC_PAGESIZE 16384
......
...@@ -34,7 +34,6 @@ typedef unsigned long elf_fpregset_t; ...@@ -34,7 +34,6 @@ typedef unsigned long elf_fpregset_t;
#define ELF_PLAT_INIT(_r) _r->er1 = 0 #define ELF_PLAT_INIT(_r) _r->er1 = 0
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#include <asm/intrinsics.h> #include <asm/intrinsics.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define USE_ELF_CORE_DUMP 1
/* Override elfcore.h */ /* Override elfcore.h */
#define _LINUX_ELFCORE_H 1 #define _LINUX_ELFCORE_H 1
typedef unsigned int elf_greg_t; typedef unsigned int elf_greg_t;
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define ELF_DATA ELFDATA2LSB #define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_IA_64 #define ELF_ARCH EM_IA_64
#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
/* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are /* Least-significant four bits of ELF header's e_flags are OS-specific. The bits are
......
...@@ -102,7 +102,6 @@ typedef elf_fpreg_t elf_fpregset_t; ...@@ -102,7 +102,6 @@ typedef elf_fpreg_t elf_fpregset_t;
*/ */
#define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0 #define ELF_PLAT_INIT(_r, load_addr) (_r)->r0 = 0
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
/* /*
......
...@@ -59,7 +59,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t; ...@@ -59,7 +59,6 @@ typedef struct user_m68kfp_struct elf_fpregset_t;
is actually used on ASV. */ is actually used on ASV. */
#define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0 #define ELF_PLAT_INIT(_r, load_addr) _r->a1 = 0
#define USE_ELF_CORE_DUMP
#ifndef CONFIG_SUN3 #ifndef CONFIG_SUN3
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
#else #else
......
...@@ -77,7 +77,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ...@@ -77,7 +77,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define ELF_DATA ELFDATA2MSB #define ELF_DATA ELFDATA2MSB
#endif #endif
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
......
...@@ -326,7 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); ...@@ -326,7 +326,6 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \
dump_task_fpu(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
/* This yields a mask that user programs can use to figure out what /* This yields a mask that user programs can use to figure out what
......
...@@ -77,7 +77,6 @@ do { \ ...@@ -77,7 +77,6 @@ do { \
_ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \ _ur->a1 = 0; _ur->a0 = 0; _ur->d1 = 0; _ur->d0 = 0; \
} while (0) } while (0)
#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
......
...@@ -328,7 +328,6 @@ struct pt_regs; /* forward declaration... */ ...@@ -328,7 +328,6 @@ struct pt_regs; /* forward declaration... */
such function. */ such function. */
#define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0 #define ELF_PLAT_INIT(_r, load_addr) _r->gr[23] = 0
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -170,7 +170,6 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; ...@@ -170,7 +170,6 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) #define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
#define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC) #define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC)
#define USE_ELF_CORE_DUMP
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
......
...@@ -155,7 +155,6 @@ extern unsigned int vdso_enabled; ...@@ -155,7 +155,6 @@ extern unsigned int vdso_enabled;
} while (0) } while (0)
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -61,7 +61,6 @@ struct task_struct; ...@@ -61,7 +61,6 @@ struct task_struct;
struct pt_regs; struct pt_regs;
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
/* This yields a mask that user programs can use to figure out what /* This yields a mask that user programs can use to figure out what
......
...@@ -114,7 +114,6 @@ typedef struct user_fpu_struct elf_fpregset_t; ...@@ -114,7 +114,6 @@ typedef struct user_fpu_struct elf_fpregset_t;
*/ */
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define USE_ELF_CORE_DUMP
#define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC #define ELF_FDPIC_CORE_EFLAGS EF_SH_FDPIC
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
......
...@@ -104,8 +104,6 @@ typedef struct { ...@@ -104,8 +104,6 @@ typedef struct {
#define ELF_CLASS ELFCLASS32 #define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2MSB #define ELF_DATA ELFDATA2MSB
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
......
...@@ -152,7 +152,6 @@ typedef struct { ...@@ -152,7 +152,6 @@ typedef struct {
(x)->e_machine == EM_SPARC32PLUS) (x)->e_machine == EM_SPARC32PLUS)
#define compat_start_thread start_thread32 #define compat_start_thread start_thread32
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -48,7 +48,6 @@ typedef struct user_i387_struct elf_fpregset_t; ...@@ -48,7 +48,6 @@ typedef struct user_i387_struct elf_fpregset_t;
PT_REGS_EAX(regs) = 0; \ PT_REGS_EAX(regs) = 0; \
} while (0) } while (0)
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
......
...@@ -17,8 +17,6 @@ extern long elf_aux_hwcap; ...@@ -17,8 +17,6 @@ extern long elf_aux_hwcap;
#define ELF_CLASS ELFCLASS32 #define ELF_CLASS ELFCLASS32
#endif #endif
#define USE_ELF_CORE_DUMP
#define R_386_NONE 0 #define R_386_NONE 0
#define R_386_32 1 #define R_386_32 1
#define R_386_PC32 2 #define R_386_PC32 2
......
...@@ -104,7 +104,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); ...@@ -104,7 +104,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
clear_thread_flag(TIF_IA32); clear_thread_flag(TIF_IA32);
#endif #endif
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
......
...@@ -239,7 +239,6 @@ extern int force_personality32; ...@@ -239,7 +239,6 @@ extern int force_personality32;
#endif /* !CONFIG_X86_32 */ #endif /* !CONFIG_X86_32 */
#define CORE_DUMP_USE_REGSET #define CORE_DUMP_USE_REGSET
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096 #define ELF_EXEC_PAGESIZE 4096
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical /* This is the location that an ET_DYN program is loaded if exec'ed. Typical
......
...@@ -123,7 +123,6 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *); ...@@ -123,7 +123,6 @@ extern void xtensa_elf_core_copy_regs (xtensa_gregset_t *, struct pt_regs *);
#define ELF_CLASS ELFCLASS32 #define ELF_CLASS ELFCLASS32
#define ELF_ARCH EM_XTENSA #define ELF_ARCH EM_XTENSA
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE PAGE_SIZE #define ELF_EXEC_PAGESIZE PAGE_SIZE
/* /*
......
...@@ -44,7 +44,7 @@ static unsigned long elf_map(struct file *, unsigned long, struct elf_phdr *, ...@@ -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 * If we don't support core dumping, then supply a NULL so we
* don't even try. * 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); static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit);
#else #else
#define elf_core_dump NULL #define elf_core_dump NULL
...@@ -1101,12 +1101,7 @@ static int load_elf_library(struct file *file) ...@@ -1101,12 +1101,7 @@ static int load_elf_library(struct file *file)
return error; return error;
} }
/* #ifdef CONFIG_ELF_CORE
* 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)
/* /*
* ELF core dumper * ELF core dumper
* *
...@@ -2063,7 +2058,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un ...@@ -2063,7 +2058,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un
return has_dumped; return has_dumped;
} }
#endif /* USE_ELF_CORE_DUMP */ #endif /* CONFIG_ELF_CORE */
static int __init init_elf_binfmt(void) static int __init init_elf_binfmt(void)
{ {
......
...@@ -75,14 +75,14 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *, ...@@ -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 *, static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *,
struct file *, struct mm_struct *); 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); static int elf_fdpic_core_dump(long, struct pt_regs *, struct file *, unsigned long limit);
#endif #endif
static struct linux_binfmt elf_fdpic_format = { static struct linux_binfmt elf_fdpic_format = {
.module = THIS_MODULE, .module = THIS_MODULE,
.load_binary = load_elf_fdpic_binary, .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, .core_dump = elf_fdpic_core_dump,
#endif #endif
.min_coredump = ELF_EXEC_PAGESIZE, .min_coredump = ELF_EXEC_PAGESIZE,
...@@ -1201,7 +1201,7 @@ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params, ...@@ -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 * 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 * These are the only things you should do on a core-file: use only these
...@@ -1826,4 +1826,4 @@ static int elf_fdpic_core_dump(long signr, struct pt_regs *regs, ...@@ -1826,4 +1826,4 @@ static int elf_fdpic_core_dump(long signr, struct pt_regs *regs,
#undef NUM_NOTES #undef NUM_NOTES
} }
#endif /* USE_ELF_CORE_DUMP */ #endif /* CONFIG_ELF_CORE */
...@@ -2266,7 +2266,7 @@ static const struct inode_operations proc_attr_dir_inode_operations = { ...@@ -2266,7 +2266,7 @@ static const struct inode_operations proc_attr_dir_inode_operations = {
#endif #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, static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -2623,7 +2623,7 @@ static const struct pid_entry tgid_base_stuff[] = { ...@@ -2623,7 +2623,7 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_FAULT_INJECTION #ifdef CONFIG_FAULT_INJECTION
REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations), REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),
#endif #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), REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),
#endif #endif
#ifdef CONFIG_TASK_IO_ACCOUNTING #ifdef CONFIG_TASK_IO_ACCOUNTING
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment