diff --git a/diff.py b/diff.py index a50d3c6..229ce83 100755 --- a/diff.py +++ b/diff.py @@ -2431,15 +2431,15 @@ def _collect_and_normalize(self, lines: List[str], is_be: bool) -> List[str]: break if is_mova and addr not in self._relocs: - # Remove from imm table if present - if jtbl_addr in self._imms: - del self._imms[jtbl_addr] - # Search up to 10 lines before end = min(i, 10) jtbl_count = self._test_jtbl(lines[i - 2 : i - end : -1]) if jtbl_count != -1: + # Remove from imm table if present + if jtbl_addr in self._imms: + del self._imms[jtbl_addr] + self._jtbls[jtbl_addr] = self.JtblEntry(jtbl_count, addr + 4) # None of the above @@ -2533,6 +2533,15 @@ def process_reloc(self, row: str, prev: str) -> Tuple[str, Optional[str]]: elif "R_SH_CODE" in row: # This one is a GNU thing, can be ignored return prev, None + elif "R_SH_DATA" in row: + # This one is a GNU thing, can be ignored + return prev, None + elif "R_SH_LABEL" in row: + # This one is a GNU thing, can be ignored + return prev, None + elif "R_SH_ALIGN" in row: + # This one is a GNU thing, can be ignored + return prev, None else: assert False, f"unknown relocation type '{row}' for line '{prev}'"