Commit ba0004dd authored by Sascha Schirra's avatar Sascha Schirra
Browse files

more stable architecture selection

parent 5723f8a8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -206,7 +206,10 @@ class ELF(Loader):

    @property
    def arch(self):
        try:
            return self.__elf_module.ARCH[(EM[self.ehdr.e_machine], ELFCLASS[self.ehdr.e_ident[EI.CLASS]])]
        except:
            raise LoaderError('Architecture not supported')

    @property
    def executableSections(self):
+4 −1
Original line number Diff line number Diff line
@@ -56,7 +56,10 @@ class PE(Loader):

    @property
    def arch(self):
        try:
            return self.__pe_module.ARCH[self.imageNtHeaders.FileHeader.Machine]
        except:
            raise LoaderError('Architecture not supported')

    @property
    def type(self):