elf revision 68349
1 2#------------------------------------------------------------------------------ 3# elf: file(1) magic for ELF executables 4# 5# We have to check the byte order flag to see what byte order all the 6# other stuff in the header is in. 7# 8# MIPS R3000 may also be for MIPS R2000. 9# What're the correct byte orders for the nCUBE and the Fujitsu VPP500? 10# 11# updated by Daniel Quinlan (quinlan@yggdrasil.com) 120 string \177ELF ELF 13>4 byte 0 invalid class 14>4 byte 1 32-bit 15# only for MIPS R3000_BE 16>>18 beshort 8 17>>>36 belong &0x20 N32 18>4 byte 2 64-bit 19>5 byte 0 invalid byte order 20>5 byte 1 LSB 21>>16 leshort 0 no file type, 22>>16 leshort 1 relocatable, 23>>16 leshort 2 executable, 24>>16 leshort 3 shared object, 25# Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de> 26# corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> 27>>16 leshort 4 core file 28>>>(0x38+0xcc) string >\0 of '%s' 29>>>(0x38+0x10) lelong >0 (signal %d), 30>>16 leshort &0xff00 processor-specific, 31>>18 leshort 0 no machine, 32>>18 leshort 1 AT&T WE32100 - invalid byte order, 33>>18 leshort 2 SPARC - invalid byte order, 34>>18 leshort 3 Intel 80386, 35>>18 leshort 4 Motorola 68000 - invalid byte order, 36>>18 leshort 5 Motorola 88000 - invalid byte order, 37>>18 leshort 6 Intel 80486, 38>>18 leshort 7 Intel 80860, 39>>18 leshort 8 MIPS R3000_BE - invalid byte order, 40>>18 leshort 9 Amdahl - invalid byte order, 41>>18 leshort 10 MIPS R3000_LE, 42>>18 leshort 11 RS6000 - invalid byte order, 43>>18 leshort 15 PA-RISC - invalid byte order, 44>>18 leshort 16 nCUBE, 45>>18 leshort 17 Fujitsu VPP500, 46>>18 leshort 18 SPARC32PLUS, 47>>18 leshort 20 PowerPC, 48>>18 leshort 36 NEC V800, 49>>18 leshort 37 Fujitsu FR20, 50>>18 leshort 38 TRW RH-32, 51>>18 leshort 39 Motorola RCE, 52>>18 leshort 40 Advanced RISC Machines ARM, 53>>18 leshort 41 Alpha, 54>>18 leshort 42 Hitachi SH, 55>>18 leshort 43 SPARC V9 - invalid byte order, 56>>18 leshort 44 Siemens Tricore Embedded Processor, 57>>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc., 58>>18 leshort 46 Hitachi H8/300, 59>>18 leshort 47 Hitachi H8/300H, 60>>18 leshort 48 Hitachi H8S, 61>>18 leshort 49 Hitachi H8/500, 62>>18 leshort 50 IA-64 (Intel 64 bit architecture) 63>>18 leshort 51 Stanford MIPS-X, 64>>18 leshort 52 Motorola Coldfire, 65>>18 leshort 53 Motorola M68HC12, 66>>18 leshort 75 Digital VAX, 67>>18 leshort 0x9026 Alpha (unofficial), 68>>20 lelong 0 invalid version 69>>20 lelong 1 version 1 70>>36 lelong 1 MathCoPro/FPU/MAU Required 71>8 string >\0 (%s) 72>5 byte 2 MSB 73# only for MIPS R3000_BE 74>>18 beshort 8 75# only for 32-bit 76>>>4 byte 1 77>>>>36 belong&0xf0000000 0x00000000 mips-1 78>>>>36 belong&0xf0000000 0x10000000 mips-2 79>>>>36 belong&0xf0000000 0x20000000 mips-3 80>>>>36 belong&0xf0000000 0x30000000 mips-4 81>>>>36 belong&0xf0000000 0x40000000 mips-5 82>>>>36 belong&0xf0000000 0x50000000 mips-6 83# only for 64-bit 84>>>4 byte 2 85>>>>48 belong&0xf0000000 0x00000000 mips-1 86>>>>48 belong&0xf0000000 0x10000000 mips-2 87>>>>48 belong&0xf0000000 0x20000000 mips-3 88>>>>48 belong&0xf0000000 0x30000000 mips-4 89>>>>48 belong&0xf0000000 0x40000000 mips-5 90>>>>48 belong&0xf0000000 0x50000000 mips-6 91>>16 beshort 0 no file type, 92>>16 beshort 1 relocatable, 93>>16 beshort 2 executable, 94>>16 beshort 3 shared object, 95>>16 beshort 4 core file, 96>>>(0x38+0xcc) string >\0 of '%s' 97>>>(0x38+0x10) belong >0 (signal %d), 98>>16 beshort &0xff00 processor-specific, 99>>18 beshort 0 no machine, 100>>18 beshort 1 AT&T WE32100, 101>>18 beshort 2 SPARC, 102>>18 beshort 3 Intel 80386 - invalid byte order, 103>>18 beshort 4 Motorola 68000, 104>>18 beshort 5 Motorola 88000, 105>>18 beshort 6 Intel 80486 - invalid byte order, 106>>18 beshort 7 Intel 80860, 107>>18 beshort 8 MIPS R3000_BE, 108>>18 beshort 9 Amdahl, 109>>18 beshort 10 MIPS R3000_LE - invalid byte order, 110>>18 beshort 11 RS6000, 111>>18 beshort 15 PA-RISC, 112>>18 beshort 16 nCUBE, 113>>18 beshort 17 Fujitsu VPP500, 114>>18 beshort 18 SPARC32PLUS, 115>>>36 belong&0xffff00 &0x000100 V8+ Required, 116>>>36 belong&0xffff00 &0x000200 Sun UltraSPARC1 Extensions Required, 117>>>36 belong&0xffff00 &0x000400 HaL R1 Extensions Required, 118>>>36 belong&0xffff00 &0x000800 Sun UltraSPARC3 Extensions Required, 119>>18 beshort 20 PowerPC or cisco 4500, 120>>18 beshort 21 cisco 7500, 121>>18 beshort 24 cisco SVIP, 122>>18 beshort 25 cisco 7200, 123>>18 beshort 36 NEC V800 or cisco 12000, 124>>18 beshort 37 Fujitsu FR20, 125>>18 beshort 38 TRW RH-32, 126>>18 beshort 39 Motorola RCE, 127>>18 beshort 40 Advanced RISC Machines ARM, 128>>18 beshort 41 Alpha, 129>>18 beshort 42 Hitachi SH, 130>>18 beshort 43 SPARC V9, 131>>18 beshort 44 Siemens Tricore Embedded Processor, 132>>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc., 133>>18 beshort 46 Hitachi H8/300, 134>>18 beshort 47 Hitachi H8/300H, 135>>18 beshort 48 Hitachi H8S, 136>>18 beshort 49 Hitachi H8/500, 137>>18 beshort 50 Intel Merced Processor, 138>>18 beshort 51 Stanford MIPS-X, 139>>18 beshort 52 Motorola Coldfire, 140>>18 beshort 53 Motorola M68HC12, 141>>18 beshort 75 Digital VAX, 142>>18 beshort 0x9026 Alpha (unofficial), 143>>20 belong 0 invalid version 144>>20 belong 1 version 1 145>>36 belong 1 MathCoPro/FPU/MAU Required 146