Hello,<br><br>I have a question about mapping between LLVM IR and the generated binary's<br>instruction. Is there an easy way to map an LLVM instruction to a (or<br>group of) x86 instructions spit by LLVM code generation. More<br>
specifically,<br><br>I am trying to harden some pointer dereference(against the null ptr<br>dereference). I have done some analysis around some pointer dereferences<br>at the LLVM level and inject LLVM IR code to harden them. Also I used<br>
llvm-g++ to link my hardened LLVM bit code with libraries to generate a<br>x86 binary.<br><br>Once a seg fault occurs, in my segfault handler, I will look up the binary<br>PC(program counter) and see if this is something that has been hardened by<br>
me, if so, I have some mechanism to recover this failure.<br><br>So here is a problem, I don't have the mapping information between my LLVM<br>IR and x86 instructions. I feel if it is supported by the LLVM<br>infrastructure, that will be great. Could you let me know if such<br>
information is available? If not, could you make some suggestions how to retrieve such information easily?<br><br>Thank you very much!<br><br>Wei<br><br>