Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: third_party/afl/src/qemu_mode/patches/elfload.diff

Issue 2075883002: Add American Fuzzy Lop (afl) to third_party/afl/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/afl/src/qemu_mode/patches/elfload.diff
diff --git a/third_party/afl/src/qemu_mode/patches/elfload.diff b/third_party/afl/src/qemu_mode/patches/elfload.diff
new file mode 100644
index 0000000000000000000000000000000000000000..325c917d15a3345583a0b9901eaf71057f1e63d8
--- /dev/null
+++ b/third_party/afl/src/qemu_mode/patches/elfload.diff
@@ -0,0 +1,32 @@
+--- qemu-2.3.0/linux-user/elfload.c.orig 2014-12-09 14:45:42.000000000 +0000
++++ qemu-2.3.0/linux-user/elfload.c 2015-01-28 02:51:23.719000000 +0000
+@@ -28,6 +28,8 @@
+
+ #define ELF_OSABI ELFOSABI_SYSV
+
++extern abi_ulong afl_entry_point, afl_start_code, afl_end_code;
++
+ /* from personality.h */
+
+ /*
+@@ -1889,6 +1891,8 @@
+ info->brk = 0;
+ info->elf_flags = ehdr->e_flags;
+
++ if (!afl_entry_point) afl_entry_point = info->entry;
++
+ for (i = 0; i < ehdr->e_phnum; i++) {
+ struct elf_phdr *eppnt = phdr + i;
+ if (eppnt->p_type == PT_LOAD) {
+@@ -1922,9 +1926,11 @@
+ if (elf_prot & PROT_EXEC) {
+ if (vaddr < info->start_code) {
+ info->start_code = vaddr;
++ if (!afl_start_code) afl_start_code = vaddr;
+ }
+ if (vaddr_ef > info->end_code) {
+ info->end_code = vaddr_ef;
++ if (!afl_end_code) afl_end_code = vaddr_ef;
+ }
+ }
+ if (elf_prot & PROT_WRITE) {
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/cpu-exec.diff ('k') | third_party/afl/src/qemu_mode/patches/syscall.diff » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698