Git Product home page Git Product logo

Comments (5)

pgoodman avatar pgoodman commented on May 11, 2024

I am not sure what is going on, but I strongly recommend migrating to anvill. I just compiled coremark for macOS, and opened up Binary Ninja on this specific function. I produced the attached files.
Archive.zip. Anvill was able to identify the indirect call (because Binary Ninja can recognize it, and anvill's Python scripts for interfacing with Binary Ninja can encode call site specific types).

  %123 = inttoptr i64 %1 to i32 (i64, i64, i64, i64*)*, !pc !44
  %124 = call i32 %123(i64 %119, i64 %122, i64 %2, i64* %117) #3, !pc !44

from mcsema.

pgoodman avatar pgoodman commented on May 11, 2024

Otherwise, what it looks like mcsema is doing is seeing the indirect call, and then casting it to a generic N-integer-argument function. The N in this case is derived from --explicit_args and --explicit_args_count N (defaults to 8 or so). Then, it would probably try to identify that the comparator of the merge sort has its address taken, and alter references to that comparator to be native-to-lifted entrypoint callbacks (created by this function).

from mcsema.

Stephen-lei avatar Stephen-lei commented on May 11, 2024

@pgoodman thank you very much! In my opinion anvill and mcsema both are lifting_tools , and mcsema is stronger than anvil? (i see in the mcsema program anvil is part of it) Maybe my understanding is not enough. And thank you for telling me which part of the mcsema is response to this problem, I am now studying the Callback.cpp in mcsema and trying to figure out the reason why

from mcsema.

pgoodman avatar pgoodman commented on May 11, 2024

mcsema hasn't been maintained in a long time, and is pinned on an older, less capable version of anvill and remill. Anvill has evolved substantially since then. However, Anvill still does not lift "whole programs" whereas mcsema does. Getting a working lifted program out of mcsema is a challenge.

from mcsema.

Stephen-lei avatar Stephen-lei commented on May 11, 2024

@pgoodman Thanks! My aim is to translate a whole program, so l am trying to fix the mcsema. And sorry to disturb you that now I want to see the log information of mcsesa-lift (with the --log option), but there seems some mistake with my operation, and I cant generate a log file just like mcsema-dias . Ive searched the issue list and l can`t find a solution, would you mind telling me the right operation? thank you very much!
my operation is as follows:

mcsema-lift-11.0 --arch amd64 --os linux --cfg ***/***.cfg --output ***/***.bc --explicit_args --merge_segments --name_lifted_sections --log ***/***.log
i use the typing module just like mcsema-dias, but no log file is generated. with the introduction of --help
-log (Output log filename for lifter.) type: string default: ""
i am not sure why.

from mcsema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.