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.



 arch/alpha/Kconfig      |   34 -----------------------
 arch/arm/Kconfig        |   33 ----------------------
 arch/arm26/Kconfig      |   33 ----------------------
 arch/h8300/Kconfig      |    7 ----
 arch/i386/Kconfig       |   34 -----------------------
 arch/ia64/Kconfig       |   23 ---------------
 arch/m68k/Kconfig       |   34 -----------------------
 arch/m68knommu/Kconfig  |    8 -----
 arch/mips/Kconfig       |   25 -----------------
 arch/parisc/Kconfig     |    5 ---
 arch/ppc/Kconfig        |   16 ----------
 arch/ppc64/Kconfig      |   16 ----------
 arch/s390/Kconfig       |    4 --
 arch/sh/Kconfig         |   34 -----------------------
 arch/sparc/Kconfig      |   23 ---------------
 arch/sparc64/Kconfig    |   23 ---------------
 arch/v850/Kconfig       |    8 -----
 arch/x86_64/Kconfig     |    5 ---
 fs/proc/kcore.c         |   70 ------------------------------------------------
 include/linux/proc_fs.h |    2 -
 20 files changed, 2 insertions(+), 435 deletions(-)

diff -puN arch/alpha/Kconfig~remove-kcore-aout arch/alpha/Kconfig
--- 25/arch/alpha/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/alpha/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/arm26/Kconfig~remove-kcore-aout arch/arm26/Kconfig
--- 25/arch/arm26/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/arm26/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/arm/Kconfig~remove-kcore-aout arch/arm/Kconfig
--- 25/arch/arm/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/arm/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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"
diff -puN arch/h8300/Kconfig~remove-kcore-aout arch/h8300/Kconfig
--- 25/arch/h8300/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/h8300/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/i386/Kconfig~remove-kcore-aout arch/i386/Kconfig
--- 25/arch/i386/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/i386/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -1167,40 +1167,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
diff -puN arch/ia64/Kconfig~remove-kcore-aout arch/ia64/Kconfig
--- 25/arch/ia64/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/ia64/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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"
diff -puN arch/m68k/Kconfig~remove-kcore-aout arch/m68k/Kconfig
--- 25/arch/m68k/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/m68k/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/m68knommu/Kconfig~remove-kcore-aout arch/m68knommu/Kconfig
--- 25/arch/m68knommu/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/m68knommu/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/mips/Kconfig~remove-kcore-aout arch/mips/Kconfig
--- 25/arch/mips/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/mips/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/parisc/Kconfig~remove-kcore-aout arch/parisc/Kconfig
--- 25/arch/parisc/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/parisc/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/ppc64/Kconfig~remove-kcore-aout arch/ppc64/Kconfig
--- 25/arch/ppc64/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/ppc64/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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"
diff -puN arch/ppc/Kconfig~remove-kcore-aout arch/ppc/Kconfig
--- 25/arch/ppc/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/ppc/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/s390/Kconfig~remove-kcore-aout arch/s390/Kconfig
--- 25/arch/s390/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/s390/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -217,10 +217,6 @@ config IPL_VM
 
 endchoice
 
-config KCORE_ELF
-	bool
-	default y
-
 source "fs/Kconfig.binfmt"
 
 config PROCESS_DEBUG
diff -puN arch/sh/Kconfig~remove-kcore-aout arch/sh/Kconfig
--- 25/arch/sh/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/sh/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/sparc64/Kconfig~remove-kcore-aout arch/sparc64/Kconfig
--- 25/arch/sparc64/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/sparc64/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/sparc/Kconfig~remove-kcore-aout arch/sparc/Kconfig
--- 25/arch/sparc/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/sparc/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/v850/Kconfig~remove-kcore-aout arch/v850/Kconfig
--- 25/arch/v850/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/v850/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN arch/x86_64/Kconfig~remove-kcore-aout arch/x86_64/Kconfig
--- 25/arch/x86_64/Kconfig~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/arch/x86_64/Kconfig	2003-08-30 00:54:09.000000000 -0700
@@ -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
diff -puN fs/proc/kcore.c~remove-kcore-aout fs/proc/kcore.c
--- 25/fs/proc/kcore.c~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/fs/proc/kcore.c	2003-08-30 00:54:09.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- *	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_operat
 	.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 *f
 
 	return acc;
 }
-#endif /* CONFIG_KCORE_AOUT */
diff -puN include/linux/proc_fs.h~remove-kcore-aout include/linux/proc_fs.h
--- 25/include/linux/proc_fs.h~remove-kcore-aout	2003-08-30 00:54:09.000000000 -0700
+++ 25-akpm/include/linux/proc_fs.h	2003-08-30 00:54:09.000000000 -0700
@@ -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)
 {
 }

_