I'm new to IDC scripts and would like some help at trying to apply and offset to a binary I have in loaded in IDA. Sorry not sure if my terminology is correct but I have a reference in my file "fp" that is the memory offset and is shown like

ld24    fp, #0x808000

all of the references in the file show something like,

lduh    R0, @(-0x2700, fp)

which make it difficult to link the memory addresses. If I press Ctrl-R I can correct these offsets in the file line by line but I would like a script that can do the whole file in one go if possible. enter image description here

this gives me what I am looking for

lduh    R0, @((unk_805900 - unk_808000), fp)

Any help would be appreciated, thanks

1 Answer 1


After doing the necessary operation in IDA, use File > Produce file > Dump database to IDC and look for operations with the corresponding address. Most likely it will be something like op_offset().

  • Hi Igor, thank you for the reply. I've tried this but there are no references to the offset in the IDC file that is generated?
    – AndS
    Oct 30, 2023 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.