[LLVMdev] LLVM for binary analysis

Carolina Simões Gomes carolina.sgomes at gmail.com
Mon Oct 17 15:08:30 PDT 2011


Interesting problem! Two suggestions that may be part of your solution:

1. Using profile information to compose basic blocks out of the stream of
assembly instructions (or does llvm-mc provide you with basic block
information already?)

2. Map assembly instructions of your target back into LLVM IR opcodes. This
will not be precise I think, but probably enough for further analysis.
However I'm not sure how to handle memory locations (i.e. you would need a
way to associate accessed memory locations and used registers to
pre-register-allocator labels, and keep track of this association as it
changes along the code).

The problem is of my interest and if I have ideas about the memory location
handling I will let you know.

On Mon, Oct 17, 2011 at 3:39 PM, Beng Heng, Ng <bengheng at eecs.umich.edu>wrote:

> Hi,
>
> I'm thinking of using LLVM for translating x86 binaries into LLVM IR and
> performing further analysis based on the IR. The tool llvm-mc works
> great for disassembling hex values. However, is there any way to
> translate the disassembled machine code into LLVM IR and analyze them?
> Any suggestion/help is greatly appreciated. Thanks!
>
> - Beng
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
[Carolina Simões Gomes]
M.Sc. Student in Computing Science
University of Alberta, Canada
CAS Partner - IBM Toronto
+1 (780) 863-0155
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111017/8be3bea9/attachment.html>


More information about the llvm-dev mailing list