[LLVMdev] Lifting ASM to IR

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Mar 12 18:33:23 PDT 2015


> On Thu, Mar 12, 2015 at 05:44:02PM -0700, Daniel Dilts wrote:
>> Does there exist a tool that could lift a binary (assembly for some
>> supported target) to LLVM IR?  If there isn't, does this seem like
>> something that would be feasible?

There's plenty of variations on the idea: Revgen/S2E, Fracture, Dagger
(my own), libcpu, several closed-source ones used by pentest shops,
some that use another representation before going to IR (say
llvm-qemu),  and probably others still I forgot about.

Are you interested in a specific target / use case?

> http://llvm.org/devmtg/2013-04/bougacha-slides.pdf
> might be a starting point.

Note that after a hiatus I've been slowly revamping Dagger (more to
come), making the implementation parts of the slides tremendously
out-of-date (it doesn't help that, at the time, I was a kid with a
laptop and a dream - not to say I'm much more now).

For instance, the translation now re-uses the existing
instruction-selection patterns in LLVM as much as possible, rather
than hand-writing them.

Also note that, as opposed to the other projects, it's a for-fun
hobby, so you might want to investigate your options ;)

-Ahmed



More information about the llvm-dev mailing list