This directory contains a collection (in progress) of examples to show what can be quickly achieved with simple LLVM passes.
-
Hello World, is a rewrite of one the examples from llvm-tutor
Execute the example
$ cargo b --example hello-world --features llvm10-0 $ opt --load-pass-plugin=target/debug/examples/libhello_world.so --passes=hello-world in.ll -S -o out.ll
-
Opcode Counter, is a rewrite of one the examples from llvm-tutor
Execute the example
$ cargo b --example opcode-counter --features llvm10-0 $ opt --load-pass-plugin=target/debug/examples/libopcode_counter.so --passes=opcode-counter-printer in.ll -S -o out.ll
-
Inject Function Call, is a rewrite of one the examples from llvm-tutor
Execute the example
$ cargo b --example inject-printf --features llvm10-0 $ opt --load-pass-plugin=target/debug/examples/libinject_printf.so --passes=inject-func-call in.ll -S -o out.ll
-
Static Call Counter, is a rewrite of one the examples from llvm-tutor
Execute the example
$ cargo b --example static-call-counter --features llvm10-0 $ opt --load-pass-plugin=target/debug/examples/libstatic_call_counter.so --passes=static-cc-printer in.ll -S -o out.ll
-
Strings Obfuscator, is a rewrite of llvm-string-obfuscator
Execute the example
$ cargo b --example string-obf --features llvm10-0 $ opt --load-pass-plugin=target/debug/examples/libstring_obf.so --passes=string-obfuscator-pass in.ll -S -o out.ll