Lines Matching +full:- +full:gcc
1 # GCC-based instrumentation for afl-fuzz
5 For the LLVM-based instrumentation, see [README.llvm.md](README.llvm.md).
7 This document describes how to build and use `afl-gcc-fast` and `afl-g++-fast`,
8 which instrument the target with the help of gcc plugins.
11 * Check the version of your gcc compiler: `gcc --version`
12 * `apt-get install gcc-VERSION-plugin-dev` or similar to install headers for gcc
14 * `gcc` and `g++` must match the gcc-VERSION you installed headers for. You can
17 * Just use `afl-gcc-fast`/`afl-g++-fast` normally like you would do with
18 `afl-clang-fast`.
23 compiler-level instrumentation, instead of the more crude assembly-level
24 rewriting approach taken by afl-gcc and afl-clang. This has several interesting
27 - The compiler can make many optimizations that are hard to pull off when
28 manually inserting assembly. As a result, some slow, CPU-bound programs will
35 - The instrumentation is CPU-independent. At least in principle, you should be
36 able to rely on it to fuzz programs on non-x86 architectures (after building
37 `afl-fuzz` with `AFL_NOX86=1`).
39 - Because the feature relies on the internals of GCC, it is gcc-specific and
44 will probably replace afl-gcc. For now, it can be built separately and co-exists
51 In order to leverage this mechanism, you need to have modern enough GCC (>=
54 installing the `gcc-VERSION-plugin-dev` packages.
57 called `afl-gcc-fast` and `afl-g++-fast` in the parent directory.
59 The gcc and g++ compiler links have to point to gcc-VERSION - or set these by
64 Once this is done, you can instrument third-party code in a way similar to the
68 CC=/path/to/afl/afl-gcc-fast
69 CXX=/path/to/afl/afl-g++-fast
75 Note: We also used `CXX` to set the C++ compiler to `afl-g++-fast` for C++ code.
77 The tool honors roughly the same environmental variables as `afl-gcc` (see
81 Note: if you want the GCC plugin to be installed on your system for all users,
86 This is an early-stage mechanism, so field reports are welcome. You can send bug
92 [README.persistent_mode.md#3) Deferred initialization](README.persistent_mode.md#3-deferred-initial…
97 [README.persistent_mode.md#4) Persistent mode](README.persistent_mode.md#4-persistent-mode).