diff -uprk.orig file-4.10.orig/magic/Magdir/elf file-4.10/magic/Magdir/elf --- file-4.10.orig/magic/Magdir/elf 2003-05-24 01:37:35 +0400 +++ file-4.10/magic/Magdir/elf 2004-10-17 01:16:52 +0400 @@ -98,7 +98,7 @@ >>18 leshort 47 Hitachi H8/300H, >>18 leshort 48 Hitachi H8S, >>18 leshort 49 Hitachi H8/500, ->>18 leshort 50 IA-64 (Intel 64 bit architecture) +>>18 leshort 50 IA-64, >>18 leshort 51 Stanford MIPS-X, >>18 leshort 52 Motorola Coldfire, >>18 leshort 53 Motorola M68HC12, @@ -186,7 +186,7 @@ >>18 beshort 47 Hitachi H8/300H, >>18 beshort 48 Hitachi H8S, >>18 beshort 49 Hitachi H8/500, ->>18 beshort 50 Intel Merced Processor, +>>18 beshort 50 IA-64, >>18 beshort 51 Stanford MIPS-X, >>18 beshort 52 Motorola Coldfire, >>18 beshort 53 Motorola M68HC12, diff -uprk.orig file-4.10.orig/src/readelf.c file-4.10/src/readelf.c --- file-4.10.orig/src/readelf.c 2004-07-25 00:57:22 +0400 +++ file-4.10/src/readelf.c 2004-10-17 01:17:24 +0400 @@ -750,7 +750,7 @@ file_tryelf(struct magic_set *ms, int fd return 0; - class = buf[4]; + class = buf[EI_CLASS]; if (class == ELFCLASS32) { Elf32_Ehdr elfhdr; @@ -760,7 +760,7 @@ file_tryelf(struct magic_set *ms, int fd u.l = 1; (void) memcpy(&elfhdr, buf, sizeof elfhdr); - swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[5]; + swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[EI_DATA]; if (getu16(swap, elfhdr.e_type) == ET_CORE) { #ifdef ELFCORE @@ -798,7 +798,7 @@ file_tryelf(struct magic_set *ms, int fd u.l = 1; (void) memcpy(&elfhdr, buf, sizeof elfhdr); - swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[5]; + swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[EI_DATA]; if (getu16(swap, elfhdr.e_type) == ET_CORE) { #ifdef ELFCORE