1234313Sbapt/*- 2234313Sbapt * Copyright (c) 2012 Olivier Houchard <cognet@FreeBSD.org> 3234313Sbapt * Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org> 4234313Sbapt * All rights reserved. 5234313Sbapt * 6234313Sbapt * Redistribution and use in source and binary forms, with or without 7234313Sbapt * modification, are permitted provided that the following conditions 8234313Sbapt * are met: 9234313Sbapt * 1. Redistributions of source code must retain the above copyright 10234313Sbapt * notice, this list of conditions and the following disclaimer. 11234313Sbapt * 2. Redistributions in binary form must reproduce the above copyright 12234313Sbapt * notice, this list of conditions and the following disclaimer in the 13234313Sbapt * documentation and/or other materials provided with the distribution. 14234313Sbapt * 15234313Sbapt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16234313Sbapt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17234313Sbapt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18234313Sbapt * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19234313Sbapt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20234313Sbapt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21234313Sbapt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22234313Sbapt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23234313Sbapt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24234313Sbapt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25234313Sbapt * SUCH DAMAGE. 26234313Sbapt * 27234313Sbapt * $FreeBSD$ 28234313Sbapt */ 29234313Sbapt 30234313Sbapt#ifndef ELF_TABLES_H_ 31234313Sbapt#define ELF_TABLES_H_ 32234313Sbaptstruct _elf_corres { 33234313Sbapt int elf_nb; 34234313Sbapt const char *string; 35234313Sbapt}; 36234313Sbapt 37241737Sedstatic struct _elf_corres mach_corres[] = { 38234313Sbapt { EM_386, "x86" }, 39234313Sbapt { EM_AMD64, "x86" }, 40234313Sbapt { EM_ARM, "arm" }, 41234313Sbapt { EM_MIPS, "mips" }, 42234313Sbapt { EM_PPC, "powerpc" }, 43234313Sbapt { EM_PPC64, "powerpc" }, 44234313Sbapt { EM_SPARCV9, "sparc64" }, 45234313Sbapt { EM_IA_64, "ia64" }, 46234313Sbapt { -1, NULL }, 47234313Sbapt}; 48234313Sbapt 49241737Sedstatic struct _elf_corres wordsize_corres[] = { 50234313Sbapt { ELFCLASS32, "32" }, 51234313Sbapt { ELFCLASS64, "64" }, 52234313Sbapt { -1, NULL}, 53234313Sbapt}; 54234313Sbapt 55241737Sedstatic struct _elf_corres endian_corres[] = { 56234313Sbapt { ELFDATA2MSB, "eb" }, 57234313Sbapt { ELFDATA2LSB, "el" }, 58234313Sbapt { -1, NULL} 59234313Sbapt}; 60234313Sbapt 61255468Sbapt#ifndef EF_MIPS_ABI 62255468Sbapt#define EF_MIPS_ABI 0x0000f000 63255468Sbapt#endif 64234313Sbapt#define E_MIPS_ABI_O32 0x00001000 65234313Sbapt#define E_MIPS_ABI_N32 0x00000020 66234313Sbapt 67234313Sbapt#define NT_VERSION 1 68234313Sbapt#define NT_ARCH 2 69234313Sbapt 70234313Sbapt#endif /* ELF_TABLES_H_ */ 71