Giter VIP home page Giter VIP logo

Comments (1)

caballa avatar caballa commented on August 27, 2024

For large projects, the way to go is the use of gclang https://github.com/SRI-CSL/gllvm.
gclang allows you to generate a single bitcode file from an arbitrary project as long as it uses standard build systems such as make or cmake.

For instance, for a project that uses make and generates the executable myexecutable, using gclang can be as easy as:

CC=gclang  ./configure
make
make install

And then, just type get-bc myexecutable where myexecutable is in the install directory.
This will generate a file myexecutable.bc that you can pass to clam.py.
The only thing that you have to make sure is that gclang points to clang-14 (see gclang doc for that).
I also typically pass -O1 because clam.py might not like -O2 or -O3 and prefers to do its own optimizations.

CC=gclang  CFLAGS="-O1" ./configure
make
make install

Let me know if you have more questions. I have used gclang many times in the past to analyze multiple real projects and it was really easy 99% of the cases.

from clam.

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.