-
Notifications
You must be signed in to change notification settings - Fork 2
Plug In: Relocate
The Relocate plug-in updates addresses within a specified range to values appropriate for another range.
Installation
.P "RE"
Usage:
.U src-from src-to dest-from [dest-to [offset-override]]
where src-from, src-to, dest-from, and dest-to are 16-bit hexadecimal addresses. offset-override is a 16-bit hexadecimal value.
Starting at dest-from, find 3-byte instructions whose operands are between source_from and source_to, and offset them by the difference between dest-from and source_from.
Usually, this tool will be used after a transfer operation. For example, to relocate $16 bytes of code from $1800 to $1400, use these two commands:
.T 1800 1816 1400
.U 1800 1816 1400
You can optionally provide a "destination to" address, which can constrict or expand the range of the code being modified. If you do this, you can also optionally provide an "offset override" value, which will be used in place of the dest_from minus src-from default.