diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2022-03-18 15:47:20 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2022-03-18 15:52:50 +0000 |
commit | a133aa91064df78298f762b5dc52e69ae7b0ae96 (patch) | |
tree | 4028ea53fdf151e4c446715cdca71b09afe6f012 | |
parent | 1d4f1e48797c064ee71441ba555b29fc3f467983 (diff) | |
download | afl++-a133aa91064df78298f762b5dc52e69ae7b0ae96.tar.gz |
docs: Document linker scripts change required in some projects
AFL instrumentation modifies the binary to export extra symbols which must be visible if the main binary dlopen()s an instrumented DLL. This change was required by nbdkit since it uses a linker script to limit the symbols exported from the main binary: https://gitlab.com/nbdkit/nbdkit/-/commit/355cacb812126f5e37a2468f6939821b15017373 Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
-rw-r--r-- | docs/fuzzing_in_depth.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/fuzzing_in_depth.md b/docs/fuzzing_in_depth.md index ac72c757..f7f5f2e8 100644 --- a/docs/fuzzing_in_depth.md +++ b/docs/fuzzing_in_depth.md @@ -333,6 +333,24 @@ is a non-standard way to set this, otherwise set up the build normally and edit the generated build environment afterwards manually to point it to the right compiler (and/or `RANLIB` and `AR`). +#### Linker scripts + +If the project uses linker scripts to hide the symbols exported by the +binary, then you may see errors such as: + +``` +undefined symbol: __afl_area_ptr +``` + +The solution is to modify the linker script to add: + +``` +{ + global: + __afl_*; +} +``` + ### f) Better instrumentation If you just fuzz a target program as-is, you are wasting a great opportunity for |