summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-02-08 05:09:27 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-02-08 05:09:27 +0000
commitdce59fe6e1e128ed03c16e493686ecd655007b83 (patch)
tree1a0af8032f920fef5e6b02bd94aa273279586f40 /sys/arch
parenteebfc47f73667f8b137ff4b393a24084a2a944fc (diff)
In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() except
leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/exec.h4
-rw-r--r--sys/arch/amd64/include/exec.h4
-rw-r--r--sys/arch/arm/include/exec.h4
-rw-r--r--sys/arch/arm64/include/exec.h5
-rw-r--r--sys/arch/hppa/include/exec.h4
-rw-r--r--sys/arch/i386/include/exec.h4
-rw-r--r--sys/arch/m88k/include/exec.h4
-rw-r--r--sys/arch/mips64/include/exec.h4
-rw-r--r--sys/arch/powerpc/include/exec.h6
-rw-r--r--sys/arch/sh/include/exec.h4
-rw-r--r--sys/arch/sparc64/include/exec.h4
11 files changed, 12 insertions, 35 deletions
diff --git a/sys/arch/alpha/include/exec.h b/sys/arch/alpha/include/exec.h
index bce4e79c9e5..ce6d3683920 100644
--- a/sys/arch/alpha/include/exec.h
+++ b/sys/arch/alpha/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.16 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.17 2017/02/08 05:09:25 guenther Exp $ */
/* $NetBSD: exec.h,v 1.1 1995/02/13 23:07:37 cgd Exp $ */
/*
@@ -40,8 +40,6 @@
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_ALPHA_EXP
-#define _KERN_DO_ELF64
-
/* Processor specific dynamic tag values. */
#define DT_ALPHA_PLTRO 0x70000000
diff --git a/sys/arch/amd64/include/exec.h b/sys/arch/amd64/include/exec.h
index a16659e7bb0..227c37ad82a 100644
--- a/sys/arch/amd64/include/exec.h
+++ b/sys/arch/amd64/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.5 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.7 2017/02/08 05:09:25 guenther Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org> Public Domain
*/
@@ -14,6 +14,4 @@
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_AMD64
-#define _KERN_DO_ELF64
-
#endif
diff --git a/sys/arch/arm/include/exec.h b/sys/arch/arm/include/exec.h
index 8c6c38cd047..154e1b2adbf 100644
--- a/sys/arch/arm/include/exec.h
+++ b/sys/arch/arm/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.5 2016/09/16 18:52:25 kettenis Exp $ */
+/* $OpenBSD: exec.h,v 1.6 2017/02/08 05:09:25 guenther Exp $ */
/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
/*
@@ -39,8 +39,6 @@
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_ARM
-#define _KERN_DO_ELF
-
#define PT_ARM_EXIDX 0x70000001
#endif /* _ARM_EXEC_H_ */
diff --git a/sys/arch/arm64/include/exec.h b/sys/arch/arm64/include/exec.h
index 5d093d6d199..9f903b60e37 100644
--- a/sys/arch/arm64/include/exec.h
+++ b/sys/arch/arm64/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ */
+/* $OpenBSD: exec.h,v 1.2 2017/02/08 05:09:25 guenther Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -26,7 +26,4 @@
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_AARCH64
-#define _NLIST_DO_ELF
-#define _KERN_DO_ELF64
-
#endif
diff --git a/sys/arch/hppa/include/exec.h b/sys/arch/hppa/include/exec.h
index ca2999b2bd4..c22a51ac3f0 100644
--- a/sys/arch/hppa/include/exec.h
+++ b/sys/arch/hppa/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.13 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.14 2017/02/08 05:09:25 guenther Exp $ */
/*
* Copyright (c) 1994, The University of Utah and
@@ -35,8 +35,6 @@
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_PARISC
-#define _KERN_DO_ELF
-
/*
* the following MD ELF values definitions are from the:
* "Processor-Specific ELF Supplement for PA-RISC.
diff --git a/sys/arch/i386/include/exec.h b/sys/arch/i386/include/exec.h
index 47b9e589446..be1af21cebd 100644
--- a/sys/arch/i386/include/exec.h
+++ b/sys/arch/i386/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.13 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.14 2017/02/08 05:09:25 guenther Exp $ */
/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
/*
@@ -40,6 +40,4 @@
#define ELF_TARG_MACH EM_386 /* XXX - EM_486 is currently unused
by all OSs/compilers/linkers */
-#define _KERN_DO_ELF
-
#endif /* _MACHINE_EXEC_H_ */
diff --git a/sys/arch/m88k/include/exec.h b/sys/arch/m88k/include/exec.h
index 94da6aa03ae..4e8fd93d6f7 100644
--- a/sys/arch/m88k/include/exec.h
+++ b/sys/arch/m88k/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.6 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.7 2017/02/08 05:09:25 guenther Exp $ */
#ifndef _M88K_EXEC_H_
#define _M88K_EXEC_H_
@@ -10,8 +10,6 @@
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_88K
-#define _KERN_DO_ELF
-
/* Processor specific dynamic tag values. */
#define DT_88K_ADDRBASE 0x70000001
#define DT_88K_PLTSTART 0x70000002
diff --git a/sys/arch/mips64/include/exec.h b/sys/arch/mips64/include/exec.h
index 8afad2b9f99..0d254343dcb 100644
--- a/sys/arch/mips64/include/exec.h
+++ b/sys/arch/mips64/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.7 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.8 2017/02/08 05:09:25 guenther Exp $ */
/*
* Copyright (c) 1996-2004 Per Fogelstrom, Opsycon AB
@@ -41,8 +41,6 @@
#endif
#define ELF_TARG_MACH EM_MIPS
-#define _KERN_DO_ELF64
-
/* Information taken from MIPS ABI supplement */
/* Architecture dependent Segment types - p_type */
diff --git a/sys/arch/powerpc/include/exec.h b/sys/arch/powerpc/include/exec.h
index 3ff1c88857e..06d8f5e0dbd 100644
--- a/sys/arch/powerpc/include/exec.h
+++ b/sys/arch/powerpc/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.14 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.15 2017/02/08 05:09:26 guenther Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom, Opsycon AB.
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: exec.h,v 1.14 2015/08/29 01:58:39 guenther Exp $
+ * $Id: exec.h,v 1.15 2017/02/08 05:09:26 guenther Exp $
*/
#ifndef _POWERPC_EXEC_H_
@@ -38,8 +38,6 @@
#define ELF_TARG_DATA ELFDATA2MSB
#define ELF_TARG_MACH EM_PPC
-#define _KERN_DO_ELF
-
/* Processor sepcific dynamic tag values. */
#define DT_PPC_GOT 0x70000000
diff --git a/sys/arch/sh/include/exec.h b/sys/arch/sh/include/exec.h
index a189a8f8aef..125287ec99a 100644
--- a/sys/arch/sh/include/exec.h
+++ b/sys/arch/sh/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.4 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.5 2017/02/08 05:09:26 guenther Exp $ */
/* $NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $ */
#define __LDPGSZ 4096
@@ -12,8 +12,6 @@
#endif
#define ELF_TARG_MACH EM_SH
-#define _KERN_DO_ELF
-
/*
* SuperH ELF header flags.
*/
diff --git a/sys/arch/sparc64/include/exec.h b/sys/arch/sparc64/include/exec.h
index 23b49c5777c..692d5faa451 100644
--- a/sys/arch/sparc64/include/exec.h
+++ b/sys/arch/sparc64/include/exec.h
@@ -1,8 +1,6 @@
-/* $OpenBSD: exec.h,v 1.10 2015/08/29 01:58:39 guenther Exp $ */
+/* $OpenBSD: exec.h,v 1.11 2017/02/08 05:09:26 guenther Exp $ */
/* $NetBSD: elf_machdep.h,v 1.7 2001/02/11 00:18:49 eeh Exp $ */
-#define _KERN_DO_ELF64
-
#define ARCH_ELFSIZE 64 /* MD native binary size */
#define ELF_TARG_CLASS ELFCLASS64
#define ELF_TARG_MACH EM_SPARCV9