def _set_type(self, ph_type): """Set the kind of segment this header describes.""" assert is_integer(ph_type) self._p_type = ElfPhType(ph_type)
def _set_machine(self, machine): """Set the machine architecture.""" assert is_integer(machine) self._e_machine = ElfMachine(machine)
def _set_version(self, version): """Set the version field.""" assert is_integer(version) self._e_version = ElfVersion(version)
def test_isinteger(self): self.assertEqual(is_integer(0), True) self.assertEqual(is_integer(37L), True) self.assertEqual(is_integer(None), False)
def _set_type(self, elf_type): """Set the machine architecture.""" assert is_integer(elf_type) self._e_type = ElfType(elf_type)
def _set_symdx(self, index): """Set the symbol table index.""" assert is_integer(index) self.r_info = (index << 8) | (self.r_info & 0xff)
def _set_type(self, reloc_type): """Set the relocation type.""" assert is_integer(reloc_type) self.r_info = (self.r_info & 0xffffff00) | reloc_type