[llvm-dev] Consistency of Memory Layout?

The Floating Brain via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 17 10:03:51 PDT 2018


Hello, first post here!

    I have been in the #llvm IRC a few times wondering the following: If I have C++ program compiled with an unknown compiler, and I have compiled llvm+clang with said compiler and linked them as libraries, and I compile some C++ code with clang+llvm and inject it into said "host" program, how can I obtain/manipulate data from the "guest" program from the "host" program? How do I know the memory layout of an int in the guest program (for example) is the same memory layout as an int from the "host" program? Is it possible the LLVM and Clang API's are ABI aware (of how LLVM+Clang will compile) and can provide access to the data, int's, floats, function pointers, etc?

Thank you
 - TFB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180817/bd6571fd/attachment.html>


More information about the llvm-dev mailing list