Code Monkey home page Code Monkey logo

Comments (7)

rofl0r avatar rofl0r commented on May 28, 2024

btw in case this is due to some external command being run that is supposed to be available, i installed my ubuntu 20.04 rootfs from the 20 mb base tarballs according to this:
https://github.com/sabotage-linux/sabotage/wiki/Running-a-minimal-ubuntu-rootfs-as-regular-user

then i installed the apt packages that were mentioned in readme.

so maybe some apt package that's installed by default on the ubuntu desktop needs to be added to the dependency list.

from rellic.

ekilmer avatar ekilmer commented on May 28, 2024

Just for posterity:

More relevant comments in #91 starting here #91 (comment)

from rellic.

surovic avatar surovic commented on May 28, 2024

And one from me for posterity. The issue lies here:

error: unknown target triple '', please use -triple or -arch

instead of the issue title.

from rellic.

rofl0r avatar rofl0r commented on May 28, 2024

The issue lies here:

so what's actually the right way to specify arch or triple ? i tried

rellic-build-1/tools/rellic-decomp-9.0 -arch=x86 --input supercard_cd_271/SuperCardsd.exe.bc --output test.c
ERROR: unknown command line flag 'arch'
root@super:/root# FLAGS_arch=x86 rellic-build-1/tools/rellic-decomp-9.0 -fromenv=arch --input supercard_cd_271/SuperCardsd.exe.bc --output test.c
ERROR: unknown command line flag 'arch' (via --fromenv or --tryfromenv)
root@super:/root# FLAGS_arch=x86 rellic-build-1/tools/rellic-decomp-9.0 -fromenv=-arch --input supercard_cd_271/SuperCardsd.exe.bc --output test.c
ERROR: flag "-arch" begins with '-'

i failed in the same way to get any actually useful --help output.

from rellic.

pgoodman avatar pgoodman commented on May 28, 2024

@rofl0r can you attach your bitcode file here?

from rellic.

rofl0r avatar rofl0r commented on May 28, 2024

@pgoodman https://0x0.st/-RQ3.xz
i added the target line as described in this post #91 (comment) to the .ll file, but i get the same error as the author of that post described.
underlying issues seems to be that rellic doesn't work with llvm bytecode produced by other tools such as retdec, but only with the elite mcsema, which can only be used by people that can afford a copy of IDA pro even though there are dozens of free and powerful disassemblers that could be used in its place.

from rellic.

pgoodman avatar pgoodman commented on May 28, 2024

@rofl0r I was able to change the triple of the bitcode module using the following commands:

clang -c ~/Downloads/bitcode/SuperCardsd.exe.bc -o ~/Downloads/bitcode/SuperCardsd.exe.ll -emit-llvm -target i486-pc-win32-unknown -S
clang -c ~/Downloads/bitcode/SuperCardsd.exe.ll -o ~/Downloads/bitcode/SuperCardsd.exe.bc -emit-llvm

That produces a LLVM assembly file with a triple. I then tried it on that file as follows:

./tools/rellic-decomp-12.0 --input ~/Downloads/bitcode/SuperCardsd.exe.bc --output /dev/stderr --lower_switch --remove_phi_nodes

This produced the following issue:

F1115 10:20:40.134071 255831552 ASTBuilder.cpp:326] Check failed: lhs && rhs Should not be null in CreateBinaryOp.
*** Check failure stack trace: ***
    @        0x103e2035f  google::LogMessageFatal::~LogMessageFatal()
    @        0x103e1c919  google::LogMessageFatal::~LogMessageFatal()
zsh: abort      ./tools/rellic-decomp-12.0 --input ~/Downloads/bitcode/SuperCardsd.exe.bc

@rofl0r we'd appreciate your help in making Rellic work with retdec-produced bitcode. Can you help us diagnose this issue by introducing additional logging here to help us determine which of lhs or rhs is null, and what they relate to in the original bitcode?

from rellic.

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.