Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
henry5421 authored Mar 29, 2018
1 parent bc1e49d commit ab3d212
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/rewriter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ Note:
- only the ".text" section of test.o will be injected into /bin/ls

### Writing your code in C (limited support) and inject your code.
Finish the steps in [patch](../patch/README.md) to see how to write your instrumentation code in C.
Finish the steps in [tutorial](../patch/tutorial/README.md) to see how to write your instrumentation code in C.

Instrument the binary with your instrumentation code.
```
./example/inject_instrumentation.py -f /bin/ls -i instrument_code -o myls
./myls
src/analysis/patch-binary.sh /bin/ls your_instrument_code ./newls
./newls
```
Note:
- Instrumentation code written in C has limited support that only local variable and constant variable definition is supported. Global variable support will be future work.
Note that instrumentation code written in C has the following limited support:
- only local variable and constant variable definition is supported.
- only system call wrapper and PLT functions are supported for hooking.
- only support hooking direct jumps and direct calls.

0 comments on commit ab3d212

Please sign in to comment.