diff --git a/diff.py b/diff.py index 589f754..2b8f13e 100755 --- a/diff.py +++ b/diff.py @@ -2074,6 +2074,11 @@ def process_reloc(self, row: str, prev: str) -> Tuple[str, Optional[str]]: # Offset value # Example movb $0x0,0x4 + # Example %edi,4 + if not addr_imm: + addr_imm = re.search(r"(?:0x)?[0-9a-f]+$", args) + offset = True + # Example movb $0x0,0x4(%si) if not addr_imm: addr_imm = re.search(r"(?<=,)0x[0-9a-f]+", args) @@ -2925,6 +2930,14 @@ def process(dump: str, config: Config) -> List[Line]: break i += 1 + # Example call 0 + if arch.name is "x86" and mnemonic == "call" and comment and symbol is None: + addr_imm = re.search(r"(?:0x)?0+$", original) + if addr_imm is not None: + start, end = addr_imm.span() + symbol = comment[1 : len(comment) - 1] + original = original[:start] + symbol + is_text_relative_j = False if ( arch.name in MIPS_ARCH_NAMES