Python bindings for defining relocations and handlers#7980
Python bindings for defining relocations and handlers#7980nullableVoidPtr wants to merge 3 commits intoVector35:devfrom
Conversation
|
Need to force-rebase against actual upstream instead of my mistaken APX fork |
189a44b to
63ed41b
Compare
|
Insofar, reading relocations work fine - needs more testing re: |
|
|
||
| return bytes(dest) | ||
|
|
||
| def get_operand_for_external_relocation(self, data: bytes, addr: int, il: lowlevelil.LowLevelILFunction, reloc: Relocation) -> bool | Optional['lowlevelil.ExpressionIndex']: |
There was a problem hiding this comment.
operand != expr index, just return a int for now
BinaryView.define_relocation
e9ab357 to
72fd03f
Compare
|
Can you provide a test case demonstrating this code working? I haven't fully digested the code but ApplyRelocation involves directly modifying bytes at a passed in pointer in C++ and when I originally wrote this code I didn't take the time to think through how to accomplish this in pythonic way. |
|
Apologies - I forgot to reply this. Really the "Pythonic" way would be ingesting a "src_bytes" and returning something like an optional "overwritten" bytes, with nil value for failure. I haven't written a test for it yet since it does require somewhat more extensive harnesses but I can get around to it this weekend. |
Fixes #1470