Commit e23a1220 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] kill CONFIG_KCORE_AOUT

From: Adrian Bunk <bunk@fs.tum.de>

Remove CONFIG_KCORE_AOUT: the ability to present /proc/kcore in a.out
format.

I've checked with various arch maintainers.  It won't be missed.
parent 09952a58
......@@ -597,40 +597,6 @@ config HOTPLUG
source "drivers/pcmcia/Kconfig"
choice
prompt "Kernel core (/proc/kcore) format"
depends on PROC_FS
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
config SRM_ENV
tristate "SRM environment through procfs"
depends on PROC_FS
......
......@@ -654,39 +654,6 @@ config FPE_FASTFPE
If you do not feel you need a faster FP emulation you should better
choose NWFPE.
choice
prompt "Kernel core (/proc/kcore) format"
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
source "fs/Kconfig.binfmt"
source "drivers/base/Kconfig"
......
......@@ -146,39 +146,6 @@ config FPE_NWFPE
You may say N here if you are going to load the Acorn FPEmulator
early in the bootup.
choice
prompt "Kernel core (/proc/kcore) format"
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
source "fs/Kconfig.binfmt"
config PREEMPT
......
......@@ -177,13 +177,6 @@ endmenu
menu "Executable file formats"
config KCORE_AOUT
bool
default y
config KCORE_ELF
default y
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -1156,40 +1156,6 @@ endmenu
menu "Executable file formats"
choice
prompt "Kernel core (/proc/kcore) format"
depends on PROC_FS
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -297,29 +297,6 @@ config IA64_SGI_SN_SIM
If you are compiling a kernel that will run under SGI's IA-64
simulator (Medusa) then say Y, otherwise say N.
# On IA-64, we always want an ELF /proc/kcore.
config KCORE_ELF
bool
default y
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config FORCE_MAX_ZONEORDER
int
default "18"
......
......@@ -342,40 +342,6 @@ endmenu
menu "General setup"
choice
prompt "Kernel core (/proc/kcore) format"
depends on PROC_FS
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
source "fs/Kconfig.binfmt"
config ZORRO
......
......@@ -490,14 +490,6 @@ endmenu
menu "Executable file formats"
config KCORE_AOUT
bool
default y
config KCORE_ELF
bool
default y
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -1126,31 +1126,6 @@ endmenu
menu "Executable file formats"
config KCORE_ELF
bool
default y
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool
source "fs/Kconfig.binfmt"
config TRAD_SIGNALS
......
......@@ -161,11 +161,6 @@ source "drivers/parisc/Kconfig"
menu "Executable file formats"
config KCORE_ELF
bool
depends on PROC_FS
default y
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -795,22 +795,6 @@ config PCI_PERMEDIA
bool "PCI for Permedia2"
depends on !4xx && !8xx && APUS
# only elf supported, a.out is not -- Cort
config KCORE_ELF
bool
depends on PROC_FS
default y
help
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image in ELF format. This
can be used in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel.
config KERNEL_ELF
bool
default y
......
......@@ -175,22 +175,6 @@ config PCI_DOMAINS
bool
default PCI
# only elf supported, a.out is not -- Cort
config KCORE_ELF
bool
depends on PROC_FS
default y
help
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image in ELF format. This
can be used in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel.
source "fs/Kconfig.binfmt"
source "drivers/pci/Kconfig"
......
......@@ -217,10 +217,6 @@ config IPL_VM
endchoice
config KCORE_ELF
bool
default y
source "fs/Kconfig.binfmt"
config PROCESS_DEBUG
......
......@@ -729,40 +729,6 @@ endmenu
menu "Executable file formats"
choice
prompt "Kernel core (/proc/kcore) format"
depends on PROC_FS
default KCORE_ELF
config KCORE_ELF
bool "ELF"
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config KCORE_AOUT
bool "A.OUT"
help
Not necessary unless you're using a very out-of-date binutils
version. You probably want KCORE_ELF.
endchoice
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -254,29 +254,6 @@ config SUN_OPENPROMFS
<file:Documentation/modules.txt>.
The module will be called openpromfs. If unsure, say M.
config KCORE_ELF
bool
depends on PROC_FS
default y
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
source "fs/Kconfig.binfmt"
config SUNOS_EMUL
......
......@@ -363,29 +363,6 @@ config SUN_OPENPROMFS
<file:Documentation/modules.txt>.
The module will be called openpromfs. If unsure, say M.
config KCORE_ELF
bool
depends on PROC_FS
default y
---help---
If you enabled support for /proc file system then the file
/proc/kcore will contain the kernel core image. This can be used
in gdb:
$ cd /usr/src/linux ; gdb vmlinux /proc/kcore
You have two choices here: ELF and A.OUT. Selecting ELF will make
/proc/kcore appear in ELF core format as defined by the Executable
and Linking Format specification. Selecting A.OUT will choose the
old "a.out" format which may be necessary for some old versions
of binutils or on some architectures.
This is especially useful if you have compiled the kernel with the
"-g" option to preserve debugging information. It is mainly used
for examining kernel data structures on the live kernel so if you
don't understand what this means or are not a kernel hacker, just
leave it at its default value ELF.
config SPARC32_COMPAT
bool "Kernel support for Linux/Sparc 32bit binary compatibility"
help
......
......@@ -262,14 +262,6 @@ endmenu
menu "Executable file formats"
config KCORE_AOUT
bool
default y
config KCORE_ELF
bool
default y
source "fs/Kconfig.binfmt"
endmenu
......
......@@ -370,11 +370,6 @@ endmenu
menu "Executable file formats / Emulations"
config KCORE_ELF
bool
depends on PROC_FS
default y
source "fs/Kconfig.binfmt"
config IA32_EMULATION
......
/*
* fs/proc/kcore.c kernel ELF/AOUT core dumper
* fs/proc/kcore.c kernel ELF core dumper
*
* Modelled on fs/exec.c:aout_core_dump()
* Jeremy Fitzhardinge <jeremy@sw.oz.au>
......@@ -34,73 +34,6 @@ struct file_operations proc_kcore_operations = {
.open = open_kcore,
};
#ifdef CONFIG_KCORE_AOUT
static ssize_t read_kcore(struct file *file, char *buf,
size_t count, loff_t *ppos)
{
loff_t p = *ppos, memsize;
ssize_t read;
ssize_t count1;
char * pnt;
struct user dump;
#if defined (__i386__) || defined (__mc68000__) || defined(__x86_64__)
# define FIRST_MAPPED PAGE_SIZE /* we don't have page 0 mapped on x86.. */
#else
# define FIRST_MAPPED 0
#endif
memset(&dump, 0, sizeof(struct user));
dump.magic = CMAGIC;
dump.u_dsize = (virt_to_phys(high_memory) >> PAGE_SHIFT);
#if defined (__i386__) || defined(__x86_64__)
dump.start_code = PAGE_OFFSET;
#endif
#ifdef __alpha__
dump.start_data = PAGE_OFFSET;
#endif
memsize = virt_to_phys(high_memory);
if (p >= memsize)
return 0;
if (count > memsize - p)
count = memsize - p;
read = 0;
if (p < sizeof(struct user) && count > 0) {
count1 = count;
if (p + count1 > sizeof(struct user))
count1 = sizeof(struct user)-p;
pnt = (char *) &dump + p;
if (copy_to_user(buf,(void *) pnt, count1))
return -EFAULT;
buf += count1;
p += count1;
count -= count1;
read += count1;
}
if (count > 0 && p < PAGE_SIZE + FIRST_MAPPED) {
count1 = PAGE_SIZE + FIRST_MAPPED - p;
if (count1 > count)
count1 = count;
if (clear_user(buf, count1))
return -EFAULT;
buf += count1;
p += count1;
count -= count1;
read += count1;
}
if (count > 0) {
if (copy_to_user(buf,
(void *)(PAGE_OFFSET + (long)p - PAGE_SIZE), count))
return -EFAULT;
read += count;
}
*ppos += read;
return read;
}
#else /* CONFIG_KCORE_AOUT */
#ifndef kc_vaddr_to_offset
#define kc_vaddr_to_offset(v) ((v) - PAGE_OFFSET)
#endif
......@@ -482,4 +415,3 @@ static ssize_t read_kcore(struct file *file, char *buffer, size_t buflen, loff_t
return acc;
}
#endif /* CONFIG_KCORE_AOUT */
......@@ -219,7 +219,7 @@ extern struct proc_dir_entry proc_root;
#endif /* CONFIG_PROC_FS */
#if !defined(CONFIG_PROC_FS) || defined(CONFIG_KCORE_AOUT)
#if !defined(CONFIG_PROC_FS)
static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
{
}
......
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