Wei Zhang
2012-Jun-20 16:00 UTC
[LLVMdev] A question about LLVM and x86 instruction mapping
Hello, I have a question about mapping between LLVM IR and the generated binary's instruction. Is there an easy way to map an LLVM instruction to a (or group of) x86 instructions spit by LLVM code generation. More specifically, I am trying to harden some pointer dereference(against the null ptr dereference). I have done some analysis around some pointer dereferences at the LLVM level and inject LLVM IR code to harden them. Also I used llvm-g++ to link my hardened LLVM bit code with libraries to generate a x86 binary. Once a seg fault occurs, in my segfault handler, I will look up the binary PC(program counter) and see if this is something that has been hardened by me, if so, I have some mechanism to recover this failure. So here is a problem, I don't have the mapping information between my LLVM IR and x86 instructions. I feel if it is supported by the LLVM infrastructure, that will be great. Could you let me know if such information is available? If not, could you make some suggestions how to retrieve such information easily? Thank you very much! Wei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120620/c1d5da9b/attachment.html>
Maybe Matching Threads
- [Announce] Samba 4.10.14 Available for Download
- [Announce] Samba 4.10.14 Available for Download
- [RFC] Using segmentation to harden SafeStack
- [LLVMdev] LLVM seg fault : dereference an uninitialized pointer Instruction*
- [compiler-rt] Use of ESR context in AArch64 sigframe