diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java index a59ed43b16c..21b47cdb6ff 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Coff.java @@ -448,7 +448,7 @@ public class Coff { public SectionHeader[] getSectionHeaders() throws IOException { if (scnhdrs == null) { scnhdrs = new SectionHeader[getFileHeader().f_nscns]; - long sec = getFileHeader().FILHSZ + getFileHeader().f_opthdr; + long sec = FileHeader.FILHSZ + getFileHeader().f_opthdr; for (int i = 0; i < scnhdrs.length; i++, sec += SectionHeader.SCNHSZ) { scnhdrs[i] = new SectionHeader(rfile, sec); } diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java index 776dc41f642..4a8f11c933d 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/PE.java @@ -403,11 +403,11 @@ public class PE { /* PE characteristics, FileHeader.f_flags. */ if ((filhdr.f_flags & PEConstants.IMAGE_FILE_DLL) != 0) { - attrib.type = attrib.PE_TYPE_SHLIB; + attrib.type = Attribute.PE_TYPE_SHLIB; } else if ((filhdr.f_flags & PEConstants.IMAGE_FILE_EXECUTABLE_IMAGE) != 0) { - attrib.type = attrib.PE_TYPE_EXE; + attrib.type = Attribute.PE_TYPE_EXE; } else { - attrib.type = attrib.PE_TYPE_OBJ; + attrib.type = Attribute.PE_TYPE_OBJ; } // For PE always assume little endian unless otherwise. diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java index f7f7b7c02fb..0fbeefb8b13 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java @@ -530,7 +530,7 @@ public class Elf { } else { for (int i = 0; i < section.sh_size / section.sh_entsize; i++ ) { Dynamic dynEnt = new Dynamic(section, efile.readIntE(), efile.readIntE()); - if ( dynEnt.d_tag == dynEnt.DT_NULL ) + if ( dynEnt.d_tag == Dynamic.DT_NULL ) break; dynList.add(dynEnt); } @@ -617,16 +617,16 @@ public class Elf { switch( ehdr.e_type ) { case Elf.ELFhdr.ET_CORE: - attrib.type = attrib.ELF_TYPE_CORE; + attrib.type = Attribute.ELF_TYPE_CORE; break; case Elf.ELFhdr.ET_EXEC: - attrib.type = attrib.ELF_TYPE_EXE; + attrib.type = Attribute.ELF_TYPE_EXE; break; case Elf.ELFhdr.ET_REL: - attrib.type = attrib.ELF_TYPE_OBJ; + attrib.type = Attribute.ELF_TYPE_OBJ; break; case Elf.ELFhdr.ET_DYN: - attrib.type = attrib.ELF_TYPE_SHLIB; + attrib.type = Attribute.ELF_TYPE_SHLIB; break; } @@ -744,9 +744,9 @@ public class Elf { sections[i].sh_info = efile.readIntE(); sections[i].sh_addralign = efile.readIntE(); sections[i].sh_entsize = efile.readIntE(); - if ( sections[i].sh_type == sections[i].SHT_SYMTAB ) + if ( sections[i].sh_type == Section.SHT_SYMTAB ) syms = i; - if ( syms == 0 && sections[i].sh_type == sections[i].SHT_DYNSYM ) + if ( syms == 0 && sections[i].sh_type == Section.SHT_DYNSYM ) syms = i; } } @@ -843,7 +843,7 @@ public class Elf { } public long swapInt( long val ) { - if ( ehdr.e_ident[ehdr.EI_DATA] == ehdr.ELFDATA2LSB ) { + if ( ehdr.e_ident[ELFhdr.EI_DATA] == ELFhdr.ELFDATA2LSB ) { short tmp[] = new short[4]; tmp[0] = (short)(val & 0x00ff); tmp[1] = (short)((val >> 8) & 0x00ff); @@ -855,7 +855,7 @@ public class Elf { } public int swapShort( short val ) { - if ( ehdr.e_ident[ehdr.EI_DATA] == ehdr.ELFDATA2LSB ) { + if ( ehdr.e_ident[ELFhdr.EI_DATA] == ELFhdr.ELFDATA2LSB ) { short tmp[] = new short[2]; tmp[0] = (short)(val & 0x00ff); tmp[1] = (short)((val >> 8) & 0x00ff);