xref: /aosp_15_r20/external/AFLplusplus/utils/qemu_persistent_hook/README.md (revision 08b48e0b10e97b33e7b60c5b6e2243bd915777f2)
1# QEMU persistent hook example
2
3Compile the test binary and the library:
4
5```
6make
7```
8
9Fuzz with:
10
11```
12export AFL_QEMU_PERSISTENT_ADDR=0x$(nm test | grep "T target_func" | awk '{print $1}')
13export AFL_QEMU_PERSISTENT_HOOK=./read_into_rdi.so
14
15mkdir in
16echo 0000 > in/in
17
18../../afl-fuzz -Q -i in -o out -- ./test
19```