1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

Fixed sign extension problem in elf machine comparisons (173636)

This commit is contained in:
John Cortell 2007-02-09 15:03:26 +00:00
parent b8e82d2bb1
commit a353091fbe

View file

@ -134,6 +134,7 @@ public class Elf {
public final static int EM_CYGNUS_FRV = 0x5441; public final static int EM_CYGNUS_FRV = 0x5441;
public final static int EM_IQ2000 = 0xFEBA; public final static int EM_IQ2000 = 0xFEBA;
public static final int EM_XILINX_MICROBLAZE = 0xbaab; public static final int EM_XILINX_MICROBLAZE = 0xbaab;
public static final int EM_SDMA = 0xcafe;
public byte e_ident[] = new byte[EI_NDENT]; public byte e_ident[] = new byte[EI_NDENT];
public int e_type; /* file type (Elf32_Half) */ public int e_type; /* file type (Elf32_Half) */
@ -743,7 +744,7 @@ public class Elf {
break; break;
} }
switch (ehdr.e_machine) { switch (ehdr.e_machine & 0xFFFF) {
case Elf.ELFhdr.EM_386 : case Elf.ELFhdr.EM_386 :
case Elf.ELFhdr.EM_486 : case Elf.ELFhdr.EM_486 :
attrib.cpu = "x86"; //$NON-NLS-1$ attrib.cpu = "x86"; //$NON-NLS-1$
@ -848,6 +849,9 @@ public class Elf {
case Elf.ELFhdr.EM_BLACKFIN : case Elf.ELFhdr.EM_BLACKFIN :
attrib.cpu = "bfin"; //$NON-NLS-1$ attrib.cpu = "bfin"; //$NON-NLS-1$
break; break;
case Elf.ELFhdr.EM_SDMA:
attrib.cpu = "sdma"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_NONE : case Elf.ELFhdr.EM_NONE :
default : default :
attrib.cpu = "none"; //$NON-NLS-1$ attrib.cpu = "none"; //$NON-NLS-1$