aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-04-30 10:27:43 +0200
committervanhauser-thc <vh@thc.org>2021-04-30 10:27:43 +0200
commitc9d066038fe0bbf8e0ab0a481ca320ca1c31b1bf (patch)
tree984cd4029a2676eaad78b21036af414a04a8ccf9 /utils
parent17b860d811cbd7695ab9756671c3f2d876ab25e8 (diff)
downloadafl++-c9d066038fe0bbf8e0ab0a481ca320ca1c31b1bf.tar.gz
fix PCGUARD, build aflpp_driver with fPIC
Diffstat (limited to 'utils')
-rw-r--r--utils/afl_proxy/afl-proxy.c6
-rw-r--r--utils/aflpp_driver/GNUmakefile4
2 files changed, 8 insertions, 2 deletions
diff --git a/utils/afl_proxy/afl-proxy.c b/utils/afl_proxy/afl-proxy.c
index aa7a361a..a80d8a0b 100644
--- a/utils/afl_proxy/afl-proxy.c
+++ b/utils/afl_proxy/afl-proxy.c
@@ -70,12 +70,18 @@ static void __afl_map_shm(void) {
char *id_str = getenv(SHM_ENV_VAR);
char *ptr;
+
+ /* NOTE TODO BUG FIXME: if you want to supply a variable sized map then
+ uncomment the following: */
+
+ /*
if ((ptr = getenv("AFL_MAP_SIZE")) != NULL) {
u32 val = atoi(ptr);
if (val > 0) __afl_map_size = val;
}
+ */
if (__afl_map_size > MAP_SIZE) {
diff --git a/utils/aflpp_driver/GNUmakefile b/utils/aflpp_driver/GNUmakefile
index 8ac054a6..556f6420 100644
--- a/utils/aflpp_driver/GNUmakefile
+++ b/utils/aflpp_driver/GNUmakefile
@@ -7,7 +7,7 @@ ifneq "" "$(LLVM_BINDIR)"
LLVM_BINDIR := $(LLVM_BINDIR)/
endif
-CFLAGS := -O3 -funroll-loops -g
+CFLAGS := -O3 -funroll-loops -g -fPIC
all: libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
@@ -36,7 +36,7 @@ aflpp_qemu_driver_hook.so: aflpp_qemu_driver_hook.o
-$(LLVM_BINDIR)clang -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so
aflpp_qemu_driver_hook.o: aflpp_qemu_driver_hook.c
- -$(LLVM_BINDIR)clang -fPIC $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c
+ -$(LLVM_BINDIR)clang $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c
test: debug
#clang -S -emit-llvm -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test.ll aflpp_driver_test.c