Skip to content

Instantly share code, notes, and snippets.

@exjam
Last active November 22, 2019 09:41
Show Gist options
  • Save exjam/a9ff4f519a8734390990fe7669fc3799 to your computer and use it in GitHub Desktop.
Save exjam/a9ff4f519a8734390990fe7669fc3799 to your computer and use it in GitHub Desktop.
toc = get_name_ea_simple("_SDA2_BASE_")
pos = ida_search.find_text(0xFFE00000, 0, 0, "addi *r[0-9]+, r2", SEARCH_REGEX | SEARCH_DOWN)
while (pos != BADADDR):
op_plain_offset(pos, 2, toc)
pos = ida_search.find_text(pos + 4, 0, 0, "addi *r[0-9]+, r2", SEARCH_REGEX | SEARCH_DOWN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment