about summary refs log tree commit diff
path: root/docs/fuzzing_in_depth.md
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2022-03-18 15:47:20 +0000
committerRichard W.M. Jones <rjones@redhat.com>2022-03-18 15:52:50 +0000
commita133aa91064df78298f762b5dc52e69ae7b0ae96 (patch)
tree4028ea53fdf151e4c446715cdca71b09afe6f012 /docs/fuzzing_in_depth.md
parent1d4f1e48797c064ee71441ba555b29fc3f467983 (diff)
downloadafl++-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>
Diffstat (limited to 'docs/fuzzing_in_depth.md')
-rw-r--r--docs/fuzzing_in_depth.md18
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