Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/mips-elf2ecoff use the nbcompat copies for those files
details: https://anonhg.NetBSD.org/src/rev/d3c0bf0049f7
branches: trunk
changeset: 347567:d3c0bf0049f7
user: christos <christos%NetBSD.org@localhost>
date: Sat Sep 03 11:34:05 2016 +0000
description:
use the nbcompat copies for those files
diffstat:
tools/mips-elf2ecoff/Makefile | 3 +-
tools/mips-elf2ecoff/sys/exec_ecoff.h | 120 -----
tools/mips-elf2ecoff/sys/exec_elf.h | 750 ----------------------------------
3 files changed, 2 insertions(+), 871 deletions(-)
diffs (truncated from 891 to 300 lines):
diff -r 640474fd5b9a -r d3c0bf0049f7 tools/mips-elf2ecoff/Makefile
--- a/tools/mips-elf2ecoff/Makefile Sat Sep 03 11:18:28 2016 +0000
+++ b/tools/mips-elf2ecoff/Makefile Sat Sep 03 11:34:05 2016 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2002/12/08 20:20:02 thorpej Exp $
+# $NetBSD: Makefile,v 1.3 2016/09/03 11:34:05 christos Exp $
HOSTPROGNAME= ${_TOOL_PREFIX}mips-elf2ecoff
HOST_SRCDIR= usr.bin/elf2ecoff
HOST_CPPFLAGS= -I${.CURDIR}
+.include "${.CURDIR}/../Makefile.nbincludes"
.include "${.CURDIR}/../Makefile.host"
diff -r 640474fd5b9a -r d3c0bf0049f7 tools/mips-elf2ecoff/sys/exec_ecoff.h
--- a/tools/mips-elf2ecoff/sys/exec_ecoff.h Sat Sep 03 11:18:28 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/* $NetBSD: exec_ecoff.h,v 1.1 2002/03/23 17:13:46 bouyer Exp $ */
-
-/*
- * Copyright (c) 1994 Adam Glass
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Adam Glass.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SYS_EXEC_ECOFF_H_
-#define _SYS_EXEC_ECOFF_H_
-
-#include <machine/ecoff_machdep.h>
-
-struct ecoff_filehdr {
- ECOFF_USHORT f_magic; /* magic number */
- ECOFF_USHORT f_nscns; /* # of sections */
- ECOFF_UINT f_timdat; /* time and date stamp */
- ECOFF_ULONG f_symptr; /* file offset of symbol table */
- ECOFF_UINT f_nsyms; /* # of symbol table entries */
- ECOFF_USHORT f_opthdr; /* sizeof the optional header */
- ECOFF_USHORT f_flags; /* flags??? */
-};
-
-struct ecoff_aouthdr {
- ECOFF_USHORT magic;
- ECOFF_USHORT vstamp;
- ECOFF_PAD
- ECOFF_ULONG tsize;
- ECOFF_ULONG dsize;
- ECOFF_ULONG bsize;
- ECOFF_ULONG entry;
- ECOFF_ULONG text_start;
- ECOFF_ULONG data_start;
- ECOFF_ULONG bss_start;
- ECOFF_MACHDEP;
-};
-
-struct ecoff_scnhdr { /* needed for size info */
- char s_name[8]; /* name */
- ECOFF_ULONG s_paddr; /* physical addr? for ROMing?*/
- ECOFF_ULONG s_vaddr; /* virtual addr? */
- ECOFF_ULONG s_size; /* size */
- ECOFF_ULONG s_scnptr; /* file offset of raw data */
- ECOFF_ULONG s_relptr; /* file offset of reloc data */
- ECOFF_ULONG s_lnnoptr; /* file offset of line data */
- ECOFF_USHORT s_nreloc; /* # of relocation entries */
- ECOFF_USHORT s_nlnno; /* # of line entries */
- ECOFF_UINT s_flags; /* flags */
-};
-
-struct ecoff_exechdr {
- struct ecoff_filehdr f;
- struct ecoff_aouthdr a;
-};
-
-#define ECOFF_HDR_SIZE (sizeof(struct ecoff_exechdr))
-
-#define ECOFF_OMAGIC 0407
-#define ECOFF_NMAGIC 0410
-#define ECOFF_ZMAGIC 0413
-
-#define ECOFF_ROUND(value, by) \
- (((value) + (by) - 1) & ~((by) - 1))
-
-#define ECOFF_BLOCK_ALIGN(ep, value) \
- ((ep)->a.magic == ECOFF_ZMAGIC ? ECOFF_ROUND((value), ECOFF_LDPGSZ) : \
- (value))
-
-#define ECOFF_TXTOFF(ep) \
- ((ep)->a.magic == ECOFF_ZMAGIC ? 0 : \
- ECOFF_ROUND(ECOFF_HDR_SIZE + (ep)->f.f_nscns * \
- sizeof(struct ecoff_scnhdr), ECOFF_SEGMENT_ALIGNMENT(ep)))
-
-#define ECOFF_DATOFF(ep) \
- (ECOFF_BLOCK_ALIGN((ep), ECOFF_TXTOFF(ep) + (ep)->a.tsize))
-
-#define ECOFF_SEGMENT_ALIGN(ep, value) \
- (ECOFF_ROUND((value), ((ep)->a.magic == ECOFF_ZMAGIC ? ECOFF_LDPGSZ : \
- ECOFF_SEGMENT_ALIGNMENT(ep))))
-
-#ifdef _KERNEL
-int exec_ecoff_makecmds __P((struct proc *, struct exec_package *));
-int exec_ecoff_setup_stack __P((struct proc *, struct exec_package *));
-int cpu_exec_ecoff_probe __P((struct proc *, struct exec_package *));
-void cpu_exec_ecoff_setregs __P((struct proc *, struct exec_package *,
- u_long));
-
-int exec_ecoff_prep_omagic __P((struct proc *, struct exec_package *,
- struct ecoff_exechdr *, struct vnode *));
-int exec_ecoff_prep_nmagic __P((struct proc *, struct exec_package *,
- struct ecoff_exechdr *, struct vnode *));
-int exec_ecoff_prep_zmagic __P((struct proc *, struct exec_package *,
- struct ecoff_exechdr *, struct vnode *));
-
-#endif /* _KERNEL */
-#endif /* !_SYS_EXEC_ECOFF_H_ */
diff -r 640474fd5b9a -r d3c0bf0049f7 tools/mips-elf2ecoff/sys/exec_elf.h
--- a/tools/mips-elf2ecoff/sys/exec_elf.h Sat Sep 03 11:18:28 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,750 +0,0 @@
-/* $NetBSD: exec_elf.h,v 1.5 2014/01/03 16:50:54 dsl Exp $ */
-
-/*-
- * Copyright (c) 1994 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Christos Zoulas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SYS_EXEC_ELF_H_
-#define _SYS_EXEC_ELF_H_
-
-/*
- * The current ELF ABI specification is available at:
- * http://www.sco.com/developer/gabi/
- *
- * Current header definitions are in:
- * http://www.sco.com/developer/gabi/latest/ch4.eheader.html
- */
-
-#if defined(_KERNEL) || defined(_STANDALONE)
-#include <sys/types.h>
-#else
-#include <inttypes.h>
-#endif /* _KERNEL || _STANDALONE */
-
-typedef uint8_t Elf_Byte;
-
-typedef uint32_t Elf32_Addr;
-#define ELF32_FSZ_ADDR 4
-typedef uint32_t Elf32_Off;
-#define ELF32_FSZ_OFF 4
-typedef int32_t Elf32_Sword;
-#define ELF32_FSZ_SWORD 4
-typedef uint32_t Elf32_Word;
-#define ELF32_FSZ_WORD 4
-typedef uint16_t Elf32_Half;
-#define ELF32_FSZ_HALF 2
-
-typedef uint64_t Elf64_Addr;
-#define ELF64_FSZ_ADDR 8
-typedef uint64_t Elf64_Off;
-#define ELF64_FSZ_OFF 8
-
-#ifndef ELF64_FSZ_SWORD
-typedef int32_t Elf64_Sword;
-#define ELF64_FSZ_SWORD 4
-#endif /* ELF64_FSZ_SWORD */
-#ifndef ELF64_FSZ_WORD
-typedef uint32_t Elf64_Word;
-#define ELF64_FSZ_WORD 4
-#endif /* ELF64_FSZ_WORD */
-
-typedef int64_t Elf64_Sxword;
-#define ELF64_FSZ_XWORD 8
-typedef uint64_t Elf64_Xword;
-#define ELF64_FSZ_XWORD 8
-typedef uint16_t Elf64_Half;
-#define ELF64_FSZ_HALF 2
-
-/*
- * ELF Header
- */
-#define ELF_NIDENT 16
-
-typedef struct {
- unsigned char e_ident[ELF_NIDENT]; /* Id bytes */
- Elf32_Half e_type; /* file type */
- Elf32_Half e_machine; /* machine type */
- Elf32_Word e_version; /* version number */
- Elf32_Addr e_entry; /* entry point */
- Elf32_Off e_phoff; /* Program hdr offset */
- Elf32_Off e_shoff; /* Section hdr offset */
- Elf32_Word e_flags; /* Processor flags */
- Elf32_Half e_ehsize; /* sizeof ehdr */
- Elf32_Half e_phentsize; /* Program header entry size */
- Elf32_Half e_phnum; /* Number of program headers */
- Elf32_Half e_shentsize; /* Section header entry size */
- Elf32_Half e_shnum; /* Number of section headers */
- Elf32_Half e_shstrndx; /* String table index */
-} Elf32_Ehdr;
-
-typedef struct {
- unsigned char e_ident[ELF_NIDENT]; /* Id bytes */
- Elf64_Half e_type; /* file type */
- Elf64_Half e_machine; /* machine type */
- Elf64_Word e_version; /* version number */
- Elf64_Addr e_entry; /* entry point */
- Elf64_Off e_phoff; /* Program hdr offset */
- Elf64_Off e_shoff; /* Section hdr offset */
- Elf64_Word e_flags; /* Processor flags */
- Elf64_Half e_ehsize; /* sizeof ehdr */
- Elf64_Half e_phentsize; /* Program header entry size */
- Elf64_Half e_phnum; /* Number of program headers */
- Elf64_Half e_shentsize; /* Section header entry size */
- Elf64_Half e_shnum; /* Number of section headers */
- Elf64_Half e_shstrndx; /* String table index */
-} Elf64_Ehdr;
-
-/* e_ident offsets */
-#define EI_MAG0 0 /* '\177' */
-#define EI_MAG1 1 /* 'E' */
-#define EI_MAG2 2 /* 'L' */
-#define EI_MAG3 3 /* 'F' */
-#define EI_CLASS 4 /* File class */
-#define EI_DATA 5 /* Data encoding */
-#define EI_VERSION 6 /* File version */
-#define EI_OSABI 7 /* Operating system/ABI identification */
-#define EI_ABIVERSION 8 /* ABI version */
-#define EI_PAD 9 /* Start of padding bytes up to EI_NIDENT*/
-
-/* e_ident[ELFMAG0,ELFMAG3] */
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF"
-#define SELFMAG 4
-
-/* e_ident[EI_CLASS] */
-#define ELFCLASSNONE 0 /* Invalid class */
-#define ELFCLASS32 1 /* 32-bit objects */
-#define ELFCLASS64 2 /* 64-bit objects */
-#define ELFCLASSNUM 3
-
-/* e_ident[EI_DATA] */
-#define ELFDATANONE 0 /* Invalid data encoding */
-#define ELFDATA2LSB 1 /* 2's complement values, LSB first */
-#define ELFDATA2MSB 2 /* 2's complement values, MSB first */
-
-/* e_ident[EI_VERSION] */
-#define EV_NONE 0 /* Invalid version */
-#define EV_CURRENT 1 /* Current version */
-#define EV_NUM 2
-
-/* e_ident[EI_OSABI] */
-#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
Home |
Main Index |
Thread Index |
Old Index