I have created a function that checks the integrity of a portion of binary code.
The function is added with a llvm pass.
It needs the begin and end address plus a check value.
The check value is the result of a computation on a binary code.
Saddly, the IR pass is in the middle-end part of llvm and this part works with IR and not with binaries.
You don't know yet the binary code and how are the addresses.
For now, I create everything I can with my pass and I use pyelftool to go into the binary file and modify the hexa value like a mad man ;-)
My first question is : It is possible to know this address in advance.
I see blockaddress but I need something more flexible (address of instruction).
My second question is : Someone has a better idea for modifing the check value. My solution is not very elegant and I'm plateform dependant -.-
I hope I was understandable.
Thanks,