diff options
author | vanhauser-thc <vh@thc.org> | 2022-10-11 08:53:49 +0200 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2022-10-11 08:53:49 +0200 |
commit | e6e82948bf95fab90466cb2dfa78457c4d2d80a6 (patch) | |
tree | 30236db4d02ab69a654abf2242baeb34813c32e4 /qemu_mode/fastexit | |
parent | c5008362c64c4c70d53f7533661c22307bfcbb6e (diff) | |
download | afl++-e6e82948bf95fab90466cb2dfa78457c4d2d80a6.tar.gz |
fastexit + code format
Diffstat (limited to 'qemu_mode/fastexit')
-rw-r--r-- | qemu_mode/fastexit/Makefile | 30 | ||||
-rw-r--r-- | qemu_mode/fastexit/README.md | 5 | ||||
-rw-r--r-- | qemu_mode/fastexit/fastexit.c | 6 |
3 files changed, 41 insertions, 0 deletions
diff --git a/qemu_mode/fastexit/Makefile b/qemu_mode/fastexit/Makefile new file mode 100644 index 00000000..80a5ec48 --- /dev/null +++ b/qemu_mode/fastexit/Makefile @@ -0,0 +1,30 @@ +# +# american fuzzy lop++ - fastexit +# -------------------------------- +# +# Written by Andrea Fioraldi <andreafioraldi@gmail.com> +# +# Copyright 2019-2022 Andrea Fioraldi. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# + +TARGETS=fastexit.so fastexit32.so fastexit64.so + +all: $(TARGETS) + +fastexit.so: fastexit.c + @if $(CC) -fPIC -shared fastexit.c -o fastexit.so 2>/dev/null ; then echo "fastexit build success"; else echo "fastexit build failure (that's fine)"; fi + +fastexit32.so: fastexit.c + @if $(CC) -fPIC -m32 -shared fastexit.c -o fastexit32.so 2>/dev/null ; then echo "fastexit32 build success"; else echo "fastexit32 build failure (that's fine)"; fi + +fastexit64.so: fastexit.c + @if $(CC) -fPIC -m64 -shared fastexit.c -o fastexit64.so 2>/dev/null ; then echo "fastexit64 build success"; else echo "fastexit64 build failure (that's fine)"; fi + +clean: + rm -f fastexit.so diff --git a/qemu_mode/fastexit/README.md b/qemu_mode/fastexit/README.md new file mode 100644 index 00000000..f01340c2 --- /dev/null +++ b/qemu_mode/fastexit/README.md @@ -0,0 +1,5 @@ +# fastexit + +This library forces _exit on exit when preloaded to gain speed. + +Gives speed on complex tarets like Android or Wine. diff --git a/qemu_mode/fastexit/fastexit.c b/qemu_mode/fastexit/fastexit.c new file mode 100644 index 00000000..44141af1 --- /dev/null +++ b/qemu_mode/fastexit/fastexit.c @@ -0,0 +1,6 @@ +#include <unistd.h> +#include <stdlib.h> + +void exit(int status) { + _exit(status); +} |