elf32 header: Add defines for e_machine field in elf header
* This is the first step in #8520 * Will enable runtime_loader to idenfify binary architecture and raise proper errors.
This commit is contained in:
parent
3501992bdf
commit
1a17461323
|
@ -1,9 +1,9 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2009, Haiku Inc. All Rights Reserved.
|
|
||||||
* Distributed under the terms of the MIT license.
|
|
||||||
*
|
|
||||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
|
*
|
||||||
|
* Copyright 2002-2011, Haiku Inc. All Rights Reserved.
|
||||||
|
* Distributed under the terms of the MIT license.
|
||||||
*/
|
*/
|
||||||
#ifndef _ELF32_H
|
#ifndef _ELF32_H
|
||||||
#define _ELF32_H
|
#define _ELF32_H
|
||||||
|
@ -60,6 +60,54 @@ struct Elf32_Ehdr {
|
||||||
#define EI_VERSION 6
|
#define EI_VERSION 6
|
||||||
#define EI_PAD 7
|
#define EI_PAD 7
|
||||||
|
|
||||||
|
// e_machine (Architecture)
|
||||||
|
#define EM_NONE 0 // No machine
|
||||||
|
#define EM_M32 1 // AT&T WE 32100
|
||||||
|
#define EM_SPARC 2 // Sparc
|
||||||
|
#define EM_386 3 // Intel 80386
|
||||||
|
#define EM_68K 4 // Motorola m68k family
|
||||||
|
#define EM_88K 5 // Motorola m88k family
|
||||||
|
#define EM_486 6 // Intel 80486, Reserved for future use
|
||||||
|
#define EM_860 7 // Intel 80860
|
||||||
|
#define EM_MIPS 8 // MIPS R3000 (officially, big-endian only)
|
||||||
|
#define EM_S370 9 // IBM System/370
|
||||||
|
#define EM_MIPS_RS3_LE 10 // MIPS R3000 little-endian, Deprecated
|
||||||
|
#define EM_PARISC 15 // HPPA
|
||||||
|
#define EM_VPP550 17 // Fujitsu VPP500
|
||||||
|
#define EM_SPARC32PLUS 18 // Sun "v8plus"
|
||||||
|
#define EM_960 19 // Intel 80960
|
||||||
|
#define EM_PPC 20 // PowerPC
|
||||||
|
#define EM_PPC64 21 // 64-bit PowerPC
|
||||||
|
#define EM_S390 22 // IBM S/390
|
||||||
|
#define EM_V800 36 // NEC V800 series
|
||||||
|
#define EM_FR20 37 // Fujitsu FR20
|
||||||
|
#define EM_RH32 38 // TRW RH32
|
||||||
|
#define EM_MCORE 39 // Motorola M*Core
|
||||||
|
#define EM_RCE 39 // Old name for MCore
|
||||||
|
#define EM_ARM 40 // ARM
|
||||||
|
#define EM_OLD_ALPHA 41 // Digital Alpha
|
||||||
|
#define EM_SH 42 // Renesas / SuperH SH
|
||||||
|
#define EM_SPARCV9 43 // SPARC v9 64-bit
|
||||||
|
#define EM_TRICORE 44 // Siemens Tricore embedded processor
|
||||||
|
#define EM_ARC 45 // ARC Cores
|
||||||
|
#define EM_H8_300 46 // Renesas H8/300
|
||||||
|
#define EM_H8_300H 47 // Renesas H8/300H
|
||||||
|
#define EM_H8S 48 // Renesas H8S
|
||||||
|
#define EM_H8_500 49 // Renesas H8/500
|
||||||
|
#define EM_IA_64 50 // Intel IA-64 Processor
|
||||||
|
#define EM_MIPS_X 51 // Stanford MIPS-X
|
||||||
|
#define EM_COLDFIRE 52 // Motorola Coldfire
|
||||||
|
#define EM_68HC12 53 // Motorola M68HC12
|
||||||
|
#define EM_MMA 54 // Fujitsu Multimedia Accelerator
|
||||||
|
#define EM_PCP 55 // Siemens PCP
|
||||||
|
#define EM_NCPU 56 // Sony nCPU embedded RISC processor
|
||||||
|
#define EM_NDR1 57 // Denso NDR1 microprocesspr
|
||||||
|
#define EM_STARCORE 58 // Motorola Star*Core processor
|
||||||
|
#define EM_ME16 59 // Toyota ME16 processor
|
||||||
|
#define EM_ST100 60 // STMicroelectronics ST100 processor
|
||||||
|
#define EM_TINYJ 61 // Advanced Logic Corp. TinyJ embedded processor
|
||||||
|
#define EM_X86_64 62 // Advanced Micro Devices X86-64 processor
|
||||||
|
|
||||||
// architecture class (EI_CLASS)
|
// architecture class (EI_CLASS)
|
||||||
#define ELFCLASS32 1
|
#define ELFCLASS32 1
|
||||||
#define ELFCLASS64 2
|
#define ELFCLASS64 2
|
||||||
|
|
Loading…
Reference in New Issue