Skip to content

Commit f869393

Browse files
committed
doc: Update documents
1 parent d7a9ee3 commit f869393

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

FaultInjector.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# LLVM Based Fault Injector
2+
3+
LLVM Based Fault Injector to Minimize the Impact of Binary Code.
4+
5+
## Run sample code
6+
7+
Reference: https://github.com/rollrat/runnable-llvm/blob/master/1samples/run.py
8+
9+
Type2 Model
10+
11+
```
12+
target file: test.c
13+
14+
1. Compile with no optimizer options.
15+
clang test.c -S -emit-llvm -o test-1-clang.ll -mllvm -disable-llvm-optzns -disable-llvm-passes -O1
16+
17+
2. Run faultinject pass
18+
This pass just selects target instruction using dependency checker and marking using fake extern function.
19+
opt -S test-1-clang.ll -o test-2-faultinject.ll -faultinject
20+
21+
3. Run O2 optimizing
22+
opt -S test-2-faultinject.ll -o test-3-o2.ll -O2
23+
24+
4-1. Run injectfault pass
25+
opt -S test-3-o2.ll -o test-4-injectfault.ll -injectfault
26+
27+
4-2. Run deleteinjectfunc pass
28+
opt -S test-3-o2.ll -o test-4-deleteinjectfault.ll -deleteinjectfunc
29+
30+
5. Run llc
31+
llc test-4-injectfault.ll -o test-5-injectfault.s
32+
llc test-4-deleteinjectfault.ll -o test-5-none.s
33+
```

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ This custom-llvm has been forked for implementing fault-injector.
88

99
[Fault Injection](https://github.com/rollrat/runnable-llvm/blob/master/FaultInjector.md)
1010

11+
[Register Tracing](https://github.com/rollrat/runnable-llvm/blob/master/TraceRegister.md)
12+
1113
[Sample Codes](https://github.com/rollrat/runnable-llvm/tree/master/1samples)

TraceRegister.md

Whitespace-only changes.

0 commit comments

Comments
 (0)