Esempio n. 1
0
 def compare(self, other, source=None):
     return Difference.from_operation(
         ReadelfStringSection,
         self.path,
         other.path,
         operation_args=[self._name],
     )
Esempio n. 2
0
    def compare_details(self, other, source=None):
        differences = _compare_elf_data(self.path, other.path)
        differences = [x for x in differences if x is not None]

        # Don't add string differences if everything else has no diff
        if not differences:
            return differences

        differences.append(
            Difference.from_operation(Strings, self.path, other.path))
        return differences
Esempio n. 3
0
 def compare_details(self, other, source=None):
     return [
         Difference.from_operation(x, self, other)
         for x in list(self.DECOMPILE_OPERATIONS)
     ]
Esempio n. 4
0
def _compare_elf_data(path1, path2):
    return [
        Difference.from_operation(x, path1, path2, ignore_returncodes={1})
        for x in list(READELF_COMMANDS)
    ]