Skip to content

The easiest way to move an offset #784

Answered by ltrzesniewski
Serg046 asked this question in Q&A
Discussion options

You must be logged in to vote

I suppose the easiest way would be to convert the call instruction into a nop by changing the opcode on the Instruction instance and clearing its operand, then inserting the second nop and a call instruction created from scratch afterwards. That way existing references would be preserved, but would now point to the first nop.

Maybe that's not very intuitive, but at least it won't require you to update the references (which is a bit tricky to get right).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Serg046
Comment options

Answer selected by Serg046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants