All Projects → ahmedbougacha → Dagger

ahmedbougacha / Dagger

Licence: other
Binary Translator to LLVM IR

Labels

Projects that are alternatives of or similar to Dagger

Metareflect
Metareflect is a lightweight reflection system for C++, based on LLVM and Clangs libtooling.
Stars: ✭ 125 (-28.16%)
Mutual labels:  llvm
Clang Llvm Tutorial
clang & llvm examples, e.g. AST Interpreter, Function Pointer Analysis, Value Range Analysis, Data-Flow Analysis, Andersen Pointer Analysis, LLVM Backend...
Stars: ✭ 139 (-20.11%)
Mutual labels:  llvm
Jitfromscratch
Example project from my talks in the LLVM Social Berlin and C++ User Group
Stars: ✭ 158 (-9.2%)
Mutual labels:  llvm
Gllvm
Whole Program LLVM: wllvm ported to go
Stars: ✭ 126 (-27.59%)
Mutual labels:  llvm
Accelerate Llvm
LLVM backend for Accelerate
Stars: ✭ 134 (-22.99%)
Mutual labels:  llvm
Ispc
Intel SPMD Program Compiler
Stars: ✭ 1,924 (+1005.75%)
Mutual labels:  llvm
Llvm Mirror
NOTE: The LLVM project now operates official Git mirrors as well: http://llvm.org/docs/GettingStarted.html#git-mirror -- An automated mirror of llvm/trunk from LLVM's SVN. Updates hourly. Release branches and tags are tracked manually. This mirror is *not* commit-ID compatible with the official Git mirrors.
Stars: ✭ 122 (-29.89%)
Mutual labels:  llvm
Mcsema
Framework for lifting x86, amd64, aarch64, sparc32, and sparc64 program binaries to LLVM bitcode
Stars: ✭ 2,198 (+1163.22%)
Mutual labels:  llvm
Lowfat
Lean C/C++ Bounds Checking with Low-Fat Pointers
Stars: ✭ 139 (-20.11%)
Mutual labels:  llvm
Rhine
🔬 a C++ compiler middle-end, using an LLVM backend
Stars: ✭ 157 (-9.77%)
Mutual labels:  llvm
Llvm Node
Node LLVM 4.0+ Bindings
Stars: ✭ 127 (-27.01%)
Mutual labels:  llvm
Libcudacxx
The C++ Standard Library for your entire system.
Stars: ✭ 1,861 (+969.54%)
Mutual labels:  llvm
Sys
Sys: A Static/Symbolic Tool for Finding Good Bugs in Good (Browser) Code
Stars: ✭ 149 (-14.37%)
Mutual labels:  llvm
Proton Clang
Proton Clang toolchains builds in the form of a continuously updating Git repository. Clone with --depth=1.
Stars: ✭ 126 (-27.59%)
Mutual labels:  llvm
Cling
The cling C++ interpreter
Stars: ✭ 2,322 (+1234.48%)
Mutual labels:  llvm
Llvm Utils
LLVM/Clang for Visual Studio 2019, 2017, 2015, 2013, 2012 and 2010. clang-cl for Python3 distutils. Utils for Clang Static Analyzer
Stars: ✭ 123 (-29.31%)
Mutual labels:  llvm
Crab Llvm
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 143 (-17.82%)
Mutual labels:  llvm
Shellvm
A collection of LLVM transform and analysis passes to write shellcode in regular C
Stars: ✭ 170 (-2.3%)
Mutual labels:  llvm
Compile To Web
Discover what languages can be compiled to Web Assembly
Stars: ✭ 164 (-5.75%)
Mutual labels:  llvm
Llvm
Fork of the LLVM Compiler Infrastructure
Stars: ✭ 155 (-10.92%)
Mutual labels:  llvm

Dagger

Build Status

Dagger is a binary translator to LLVM IR, with the goal of being as native as possible to the LLVM infrastructure.

Building

As an LLVM fork, Dagger is built the same way; assuming you have a reasonably recent toolchain and CMake, just do:

  $ cd dagger
  $ mkdir build
  $ cd build
  $ cmake ..
  $ make

More information on the llvm.org Getting Started and CMake pages.

Usage

While Dagger is intended to be usable as a library, it does come with tools:

Static Binary Translation to IR: llvm-dec

llvm-dec takes in an object file and produces IR.

  $ ./bin/llvm-dec ./a.out

Dynamic Binary Translation: DYN (OS X-only)

DYN is an OS X-only dylib that is intended to be preloaded so that it can hijack program execution:

  $ echo "int main() { return 42; }" | clang -x c -
  $ DYLD_INSERT_LIBRARIES=./lib/libDYN.dylib ./a.out
  $ echo $?
 42

This will "execute" a.out by translating all of its code to LLVM IR, JITting that, and finally executing it.

The DCDYN_OPTIONS environment variable can be used to pass command-line options. For instance, if you're really brave, you can try:

 $ DCDYN_OPTIONS="-print-after-all" DYLD_INSERT_LIBRARIES=build/lib/libDYN.dylib ./a.out

which will print tons of LLVM debug output.

Features

X86 is the main currently supported target. There is ongoing work on adding AArch64 support.

The Mach-O object file format is the best supported. Basic ELF is also supported. However, except for DYN, there is always a generic fallback, so YMMV with other formats.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].