Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove the borked definition of ELF64_Shalf from some more p...
details: https://anonhg.NetBSD.org/src/rev/41b6842ed368
branches: trunk
changeset: 325701:41b6842ed368
user: dsl <dsl%NetBSD.org@localhost>
date: Fri Jan 03 16:50:54 2014 +0000
description:
Remove the borked definition of ELF64_Shalf from some more places.
Remove the _KERNEL parts of some clones of sys/elf_exec.h
One might ask why this file has got cloned so many times.
diffstat:
sys/arch/xen/include/xen-public/elfstructs.h | 3 +-
tools/amiga-elf2bb/sys/exec_elf.h | 75 +---------------------------
tools/m68k-elf2aout/sys/exec_elf.h | 57 +--------------------
tools/mips-elf2ecoff/sys/exec_elf.h | 57 +--------------------
4 files changed, 4 insertions(+), 188 deletions(-)
diffs (263 lines):
diff -r 255cd6ffa46b -r 41b6842ed368 sys/arch/xen/include/xen-public/elfstructs.h
--- a/sys/arch/xen/include/xen-public/elfstructs.h Fri Jan 03 16:40:58 2014 +0000
+++ b/sys/arch/xen/include/xen-public/elfstructs.h Fri Jan 03 16:50:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: elfstructs.h,v 1.1.1.1 2011/12/07 13:15:45 cegger Exp $ */
+/* $NetBSD: elfstructs.h,v 1.2 2014/01/03 16:50:54 dsl Exp $ */
#ifndef __XEN_PUBLIC_ELFSTRUCTS_H__
#define __XEN_PUBLIC_ELFSTRUCTS_H__ 1
/*
@@ -37,7 +37,6 @@
typedef uint64_t Elf64_Addr;
typedef uint64_t Elf64_Off;
-typedef int32_t Elf64_Shalf;
typedef int32_t Elf64_Sword;
typedef uint32_t Elf64_Word;
diff -r 255cd6ffa46b -r 41b6842ed368 tools/amiga-elf2bb/sys/exec_elf.h
--- a/tools/amiga-elf2bb/sys/exec_elf.h Fri Jan 03 16:40:58 2014 +0000
+++ b/tools/amiga-elf2bb/sys/exec_elf.h Fri Jan 03 16:50:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.3 2010/08/28 21:30:02 joerg Exp $ */
+/* $NetBSD: exec_elf.h,v 1.4 2014/01/03 16:50:54 dsl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -63,8 +63,6 @@
#define ELF64_FSZ_ADDR 8
typedef uint64_t Elf64_Off;
#define ELF64_FSZ_OFF 8
-typedef int32_t Elf64_Shalf;
-#define ELF64_FSZ_SHALF 4
#ifndef ELF64_FSZ_SWORD
typedef int32_t Elf64_Sword;
@@ -754,75 +752,4 @@
#define AuxInfo Aux64Info
#endif
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES 12 /* Size of aux array passed to loader */
-#define ELF32_NO_ADDR (~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF32_LINK_ADDR ((Elf32_Addr)-2) /* advises to use link address */
-#define ELF64_NO_ADDR (~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_LINK_ADDR ((Elf64_Addr)-2) /* advises to use link address */
-
-#if defined(ELFSIZE) && (ELFSIZE == 64)
-#define ELF_NO_ADDR ELF64_NO_ADDR
-#define ELF_LINK_ADDR ELF64_LINK_ADDR
-#elif defined(ELFSIZE) && (ELFSIZE == 32)
-#define ELF_NO_ADDR ELF32_NO_ADDR
-#define ELF_LINK_ADDR ELF32_LINK_ADDR
-#endif
-
-#ifndef ELF32_EHDR_FLAGS_OK
-#define ELF32_EHDR_FLAGS_OK(eh) 1
-#endif
-
-#ifndef ELF64_EHDR_FLAGS_OK
-#define ELF64_EHDR_FLAGS_OK(eh) 1
-#endif
-
-#if defined(ELFSIZE) && (ELFSIZE == 64)
-#define ELF_EHDR_FLAGS_OK(eh) ELF64_EHDR_FLAGS_OK(eh)
-#else
-#define ELF_EHDR_FLAGS_OK(eh) ELF32_EHDR_FLAGS_OK(eh)
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
- Elf_Addr arg_entry; /* program entry point */
- Elf_Addr arg_interp; /* Interpreter load address */
- Elf_Addr arg_phaddr; /* program header address */
- Elf_Addr arg_phentsize; /* Size of program header */
- Elf_Addr arg_phnum; /* Number of program headers */
-};
-#endif
-
-#ifndef _LKM
-#include "opt_execfmt.h"
-#endif
-
-#ifdef EXEC_ELF32
-int exec_elf32_makecmds(struct proc *, struct exec_package *);
-int elf32_copyargs(struct proc *, struct exec_package *,
- struct ps_strings *, char **, void *);
-
-int coredump_elf32(struct lwp *, struct vnode *, struct ucred *);
-int coredump_writenote_elf32(struct proc *, struct vnode *,
- struct ucred *, off_t, Elf32_Nhdr *, const char *, void *);
-
-int elf32_check_header(Elf32_Ehdr *, int);
-#endif
-
-#ifdef EXEC_ELF64
-int exec_elf64_makecmds(struct proc *, struct exec_package *);
-int elf64_read_from(struct proc *, struct vnode *, u_long, caddr_t, int);
-int elf64_copyargs(struct proc *, struct exec_package *,
- struct ps_strings *, char **, void *);
-
-int coredump_elf64 __P((struct lwp *, struct vnode *, struct ucred *));
-int coredump_writenote_elf64 __P((struct proc *, struct vnode *,
- struct ucred *, off_t, Elf64_Nhdr *, const char *, void *));
-
-int elf64_check_header(Elf64_Ehdr *, int);
-#endif
-
-#endif /* _KERNEL */
-
#endif /* !_SYS_EXEC_ELF_H_ */
diff -r 255cd6ffa46b -r 41b6842ed368 tools/m68k-elf2aout/sys/exec_elf.h
--- a/tools/m68k-elf2aout/sys/exec_elf.h Fri Jan 03 16:40:58 2014 +0000
+++ b/tools/m68k-elf2aout/sys/exec_elf.h Fri Jan 03 16:50:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.1 2011/07/16 15:52:02 tsutsui Exp $ */
+/* $NetBSD: exec_elf.h,v 1.2 2014/01/03 16:50:54 dsl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -63,8 +63,6 @@
#define ELF64_FSZ_ADDR 8
typedef uint64_t Elf64_Off;
#define ELF64_FSZ_OFF 8
-typedef int32_t Elf64_Shalf;
-#define ELF64_FSZ_SHALF 4
#ifndef ELF64_FSZ_SWORD
typedef int32_t Elf64_Sword;
@@ -749,57 +747,4 @@
#define AuxInfo Aux64Info
#endif
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES 8 /* Size of aux array passed to loader */
-#define ELF32_NO_ADDR (~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_NO_ADDR (~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-
-#if defined(ELFSIZE) && (ELFSIZE == 64)
-#define ELF_NO_ADDR ELF64_NO_ADDR
-#elif defined(ELFSIZE) && (ELFSIZE == 32)
-#define ELF_NO_ADDR ELF32_NO_ADDR
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
- Elf_Addr arg_entry; /* program entry point */
- Elf_Addr arg_interp; /* Interpreter load address */
- Elf_Addr arg_phaddr; /* program header address */
- Elf_Addr arg_phentsize; /* Size of program header */
- Elf_Addr arg_phnum; /* Number of program headers */
-};
-#endif
-
-#ifndef _LKM
-#include "opt_execfmt.h"
-#endif
-
-#ifdef EXEC_ELF32
-int exec_elf32_makecmds __P((struct proc *, struct exec_package *));
-int elf32_copyargs __P((struct exec_package *, struct ps_strings *,
- char **, void *));
-
-int coredump_elf32 __P((struct proc *, struct vnode *, struct ucred *));
-int coredump_writenote_elf32 __P((struct proc *, struct vnode *,
- struct ucred *, off_t, Elf32_Nhdr *, const char *, void *));
-#endif
-
-#ifdef EXEC_ELF64
-int exec_elf64_makecmds __P((struct proc *, struct exec_package *));
-int elf64_read_from __P((struct proc *, struct vnode *, u_long,
- caddr_t, int));
-int elf64_copyargs __P((struct exec_package *, struct ps_strings *,
- char **, void *));
-
-int coredump_elf64 __P((struct proc *, struct vnode *, struct ucred *));
-int coredump_writenote_elf64 __P((struct proc *, struct vnode *,
- struct ucred *, off_t, Elf64_Nhdr *, const char *, void *));
-#endif
-
-/* common */
-int exec_elf_setup_stack __P((struct proc *, struct exec_package *));
-
-#endif /* _KERNEL */
-
#endif /* !_SYS_EXEC_ELF_H_ */
diff -r 255cd6ffa46b -r 41b6842ed368 tools/mips-elf2ecoff/sys/exec_elf.h
--- a/tools/mips-elf2ecoff/sys/exec_elf.h Fri Jan 03 16:40:58 2014 +0000
+++ b/tools/mips-elf2ecoff/sys/exec_elf.h Fri Jan 03 16:50:54 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.4 2010/08/28 21:30:02 joerg Exp $ */
+/* $NetBSD: exec_elf.h,v 1.5 2014/01/03 16:50:54 dsl Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -63,8 +63,6 @@
#define ELF64_FSZ_ADDR 8
typedef uint64_t Elf64_Off;
#define ELF64_FSZ_OFF 8
-typedef int32_t Elf64_Shalf;
-#define ELF64_FSZ_SHALF 4
#ifndef ELF64_FSZ_SWORD
typedef int32_t Elf64_Sword;
@@ -749,57 +747,4 @@
#define AuxInfo Aux64Info
#endif
-#ifdef _KERNEL
-
-#define ELF_AUX_ENTRIES 8 /* Size of aux array passed to loader */
-#define ELF32_NO_ADDR (~(Elf32_Addr)0) /* Indicates addr. not yet filled in */
-#define ELF64_NO_ADDR (~(Elf64_Addr)0) /* Indicates addr. not yet filled in */
-
-#if defined(ELFSIZE) && (ELFSIZE == 64)
-#define ELF_NO_ADDR ELF64_NO_ADDR
-#elif defined(ELFSIZE) && (ELFSIZE == 32)
-#define ELF_NO_ADDR ELF32_NO_ADDR
-#endif
-
-#if defined(ELFSIZE)
-struct elf_args {
- Elf_Addr arg_entry; /* program entry point */
- Elf_Addr arg_interp; /* Interpreter load address */
- Elf_Addr arg_phaddr; /* program header address */
- Elf_Addr arg_phentsize; /* Size of program header */
- Elf_Addr arg_phnum; /* Number of program headers */
-};
-#endif
-
-#ifndef _LKM
-#include "opt_execfmt.h"
-#endif
-
-#ifdef EXEC_ELF32
-int exec_elf32_makecmds __P((struct proc *, struct exec_package *));
-int elf32_copyargs __P((struct exec_package *, struct ps_strings *,
- char **, void *));
-
-int coredump_elf32 __P((struct proc *, struct vnode *, struct ucred *));
-int coredump_writenote_elf32 __P((struct proc *, struct vnode *,
- struct ucred *, off_t, Elf32_Nhdr *, const char *, void *));
-#endif
-
-#ifdef EXEC_ELF64
-int exec_elf64_makecmds __P((struct proc *, struct exec_package *));
-int elf64_read_from __P((struct proc *, struct vnode *, u_long,
- caddr_t, int));
-int elf64_copyargs __P((struct exec_package *, struct ps_strings *,
- char **, void *));
-
-int coredump_elf64 __P((struct proc *, struct vnode *, struct ucred *));
-int coredump_writenote_elf64 __P((struct proc *, struct vnode *,
- struct ucred *, off_t, Elf64_Nhdr *, const char *, void *));
-#endif
-
-/* common */
-int exec_elf_setup_stack __P((struct proc *, struct exec_package *));
-
-#endif /* _KERNEL */
-
#endif /* !_SYS_EXEC_ELF_H_ */
Home |
Main Index |
Thread Index |
Old Index