Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Basic Disassembly with Libopcodes (yossarian.net)
18 points by pplonski86 on May 19, 2019 | hide | past | favorite | 2 comments


This is cool. Is the approach used to support generic disassembly like this strong enough to use for generic language definition and thus support a generic decompilation process ?


Author here.

Yes and no -- libopcodes doesn't provide a ton of target-independent information (apart from the fields that might be populated if `insn_info_valid` is true, which it never is for x86). You can throw a bunch of different targets at it and it'll happily disassemble their outputs, but without clobber information/instruction grouping/operand extraction you're basically where you started.

Capstone and LLVM-MC are potentially better starting points (the former wraps and extends the latter). Those give us (some) instruction semantics; after that, the problem of generic decompilation starts to look an awful lot like binary lifting[1]. And (static) binary lifting is pretty hard ;)

[1]: https://github.com/trailofbits/mcsema (FD: This is my employer)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: