Commit Graph

28 Commits

Author SHA1 Message Date
Peter Goodman b0f7790f43 Sparc support (#709)
* Adds sparc support; formats files

* Update the readme and walkthrough

* Minor tweaks to readme/walkthrough

* Update ci.yml
2020-11-05 12:59:20 -05:00
Peter Goodman c002b8505c Formats the code with clang-format and my additional stylistic mojojojo (#682) 2020-08-05 16:14:01 -04:00
Peter Goodman 2d55d02cc3 API improvements. Must be used with the api_improvements branches of Remill and Anvill (#666)
* API improvements. Must be used with the api_improvements branch of both Remill and McSema

fixes for x86 and running the lifted code with klee

* Update dockerfile to clone anvill

* update remill commit id

* Add python3 to dockerfile

* update python3

* disable abi script

* Updated cmake to find anvill

* Update main.cpp

* update find_package for anvill

* WIP:updated prebuild cfg

* update prebuild cfg files

* enable abi build for testsuite

* Fix memory leak

* install missing package for testcases

* frontend: Reflect cfg file changes in dyninst frontend.

* frontend: Update local files copyrights to reflect overall change to agplv3.

* fix failing testcases

* update test cfgs

* Fix test failure with local state pointer

* set the flag to use local state_ptr in default mode

Co-authored-by: kumarak <iit.akshay@gmail.com>
Co-authored-by: Lukas Korencik <xkorenc1@fi.muni.cz>
2020-07-23 02:14:56 -04:00
Aiethel 8ecfe165ef Various improvements (#628)
* bc: Inline calls to semantic functions and wrappers manually.

* bc: Inline calls to semantics and wrappers only if some flags are set.

* Refactor code that is responsible for abi libs loading.

* Wrap global pointers in RAII.

* Update .remill_commit_id

Co-authored-by: Peter Goodman <peter.goodman@gmail.com>
2020-02-10 13:20:05 -05:00
Peter Goodman 782bd1dcfa Update for new remill APIs (#595)
* Update for new remill APIs

* Update remill commit id

* Cleanups

* resolved one issue
2019-10-27 17:48:43 -04:00
Peter Goodman df1678412b Adds support for --legacy_mode, where drivers are added for the entrypoint and the callbacks 2017-08-18 15:09:25 -04:00
Peter Goodman e4d87c7154 Updates to some API changes in remill. 2017-08-04 15:27:13 -04:00
Peter Goodman c1bd1668f4 Minor fixes here and there. May not yet build! 2017-05-25 11:00:02 -04:00
AkshayK 36914c64a4 Minor changes in mcsema branch to avoid compile-time error due to new arch name; The major changes will go into remill; revisit mcsema-lift after having basic support for ARM instructions set; 2017-05-06 19:53:03 -04:00
Peter Goodman 5e508962f8 Fixes for lifting. Simple lifted binaries can now be recompiled when using the alessandro/refactor/llvmmultiversion-cmake branch of remill as a base. 2017-04-29 22:06:24 -04:00
Peter Goodman df97ad72e9 Fixes for LLVM compatibility 2017-04-21 13:41:06 -04:00
Peter Goodman 93b4aa56b4 WIP. Modified license to apache 2.0 to follow remill, also most code is new anyway. 2017-04-15 16:27:35 -04:00
Peter Goodman 30e3c86e48 Improved jump table handling and started implementing jump table (via switch inst) support on the C++ side of things. Removed some optimization passes; it seems as though the instruction combining pass of llvm injected lots of undefs into the code, which resulted in all the things optimizing themselves away. 2017-03-31 23:37:16 -04:00
Peter Goodman dcaaa8683b Makign great progress on various forms of reference resolution. 2017-03-29 00:10:22 -04:00
Peter Goodman 0441f95426 Updated copyright messages. Added namespace mcsema 2017-03-24 19:33:54 -04:00
Peter Goodman a139d435ce Another good logical spot. Have basic lifting working (no mem refs, no jump tables, etc.), and also have optimization of the lifted bitcode working nicely, with removal of ISELs and SEMs. 2017-03-24 18:02:21 -04:00
Peter Goodman f17266f985 Making progress towards initial lifting 2017-03-23 23:23:49 -04:00
artemdinaburg 2bd0259485 Externally specify semantics definitions (#205)
Main updates:

* Externally specify semantics definitions (see Arch/X86/Semantics/Bitcode/)
* Add the CMake glue to automatically build them into one giant bitcode library
* Create helper functions and macros (e.g. EXTERNAL_SEMANTICS) to specify that a semantic is externally defined
* Use FXAM as an example instruction where we do external semantics
* Add gzip to the integration tests because it hits the new FXAM code

Incidental fixes:

Add SUB64mi32 and SBB64mi32 to the translation map
Remove dependency on MCSEMA_DIR and use CMAKE_SOURCE_DIR
2017-03-21 12:24:09 -04:00
Peter Goodman 9ee7bec444 How to debug mcsema (#188)
* Generalizes two debugging features. The first, -add-breakpoints, adds instruction-specific 'breakpoint' function calls before every lifted instruction. The second, -add-reg-tracer, adds in a function that prints out the value of every general purpose register before each instruction execution.

* In-progress doc

* ...

* More of the debugging doc, some more images, a PIN tool to complement the new -add-reg-tracer option to mcsema-lift. Still a ways from being done though.
2017-03-13 22:09:45 -04:00
car 0b2764ab87 add listing of unsupported instructions 2017-03-10 11:28:50 -05:00
car 4c7cc55487 oops, typo 2017-03-10 10:49:26 -05:00
car 835205428c minor improvement to error reporting in target lookup 2017-03-10 10:41:06 -05:00
car 02b8d21ddb Merge remote-tracking branch 'origin/master' into list_supported_instructions 2017-03-09 16:10:03 -05:00
car 28a2ad289d add names for mcsema extended dispatch table 2017-03-09 15:58:00 -05:00
car 766a78afcf list supported instructions modulo mcsema-specific dispatch items 2017-03-09 14:52:56 -05:00
artemdinaburg 1d696fb040 Fix weak symbol support (#156)
* Remove an unused entry for __gmon_start__ for linux defs
* Pass the linkage type to the arch specific driver generation
2017-03-08 13:51:12 -05:00
Peter Goodman 661174afba Reorg x86 files (#155)
* Initial move of some of the files

* Rename the semantics files.

* Moves more stuff, adds some files, removes others, fixes include paths.

* Addresses comments
2017-03-08 11:10:07 -05:00
Peter Goodman bcda6a120a Llvm38 (#112)
* - Upgrade to official llvm 3.8
- remove boost
- unify all cmake files into a single cmake file
- use official protobuf
- start factoring out x86-specific stuff to eventually make an arm port easier
- simplify the CLI; now use mcsema-lift, with -arch, -os, -cfg, -entrypoint, and -o. No more having to specify the target triple.
- moves source code slightly closer to our style guide

Note:
- lifted bitcode is not quite right in some cases, so this isn't a stable branch!
- TODO: re-add test cases to discover source of stability problems.

* Some minor fixes, one to make sure xmm regs in the state struct are properly aligned

* Added missing std defs for option parsing. This makes /bin/ls work properly :-)

* Remove old cmake files

* Minor changes to get_cfg.py and raiseX86.cpp in relation to those changes. Those changes don't fix anything, the purpose was to make symbol names for things match between python and cpp. E.g. get_cfg would name things like dta_0xf00, sub_0xf00, ext_... And it seems that it was dta_ instead of data_ for a reallly flaky and dumb reason but oh well. I also fixed a subtle bug related to saving and restoring of callee saved registers on elf 64. I have not made related changes to elf 32 or pe 32/64, though those may be necessary.

* Minor fix

* Adding mcsema-disass, which is a nice wrapper around get_cfg.py.

* Working on readme and cleaning out (currently) unused stuff from the repo

* Renaming mc-sema dir to mcsema

* new travis file

* Updates to bootstrap and build process

* Minor bootstrap fixes

* Well, don't have windows working yet but this is kind of progress I think

* Travis should work now

* Updating protobuf-cmake files so we can generate a VS2015 solution

* Removing and adding some choco packages from README

* Bootstrap now builds protobuf and generates protobuf files
LLVM should now be built on Windows

* Adding Win32 specific compiler options

* Renamed ConstantInt to CreateConstantInt to satisfy MSVC

* Build Release LLVM to not have linking conflicts of MD vs MDd

* Added some missing instructions

* Adding changes to generate runtimes

* Windows bootstrap works.
2017-02-23 13:23:31 -05:00