Skip to content

Python bindings for defining relocations and handlers#7980

Open
nullableVoidPtr wants to merge 3 commits intoVector35:devfrom
nullableVoidPtr:pyreloc
Open

Python bindings for defining relocations and handlers#7980
nullableVoidPtr wants to merge 3 commits intoVector35:devfrom
nullableVoidPtr:pyreloc

Conversation

@nullableVoidPtr
Copy link
Contributor

Fixes #1470

@nullableVoidPtr
Copy link
Contributor Author

Need to force-rebase against actual upstream instead of my mistaken APX fork

@nullableVoidPtr
Copy link
Contributor Author

Insofar, reading relocations work fine - needs more testing re: define_relocation


return bytes(dest)

def get_operand_for_external_relocation(self, data: bytes, addr: int, il: lowlevelil.LowLevelILFunction, reloc: Relocation) -> bool | Optional['lowlevelil.ExpressionIndex']:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operand != expr index, just return a int for now

@plafosse
Copy link
Member

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.

@plafosse plafosse self-requested a review March 11, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants