]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/fuzz: Include LLVMFuzzerTestOneInput() in the generated .a
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 1 Mar 2017 18:22:31 +0000 (18:22 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 20 Mar 2017 16:45:20 +0000 (16:45 +0000)
Otherwise they are not suitable for use with libfuzz.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/fuzz/libelf/Makefile
tools/fuzz/x86_instruction_emulator/Makefile

index c884703ff03054129eca40765f1225fae6d6d3bc..6cdc31eeb5a32d23c00187bd38c5ab6af62f48de 100644 (file)
@@ -13,7 +13,7 @@ $(ELF_LIB_OBJS): CFLAGS += -DFUZZ_NO_LIBXC $(CFLAGS_xeninclude)
 
 libelf-fuzzer.o: CFLAGS += $(CFLAGS_xeninclude)
 
-libelf.a: $(ELF_LIB_OBJS)
+libelf.a: libelf-fuzzer.o $(ELF_LIB_OBJS)
        $(AR) rc $@ $^
 
 .PHONY: libelf-fuzzer-all
index 673b5f042d3c2971632598397ac9a8ad058fa610..abba186bcc3b8ca11605999f519b5680ae255c93 100644 (file)
@@ -30,7 +30,7 @@ x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h)
 
 x86-insn-emulator-fuzzer.o: $(x86_emulate.h)
 
-x86-insn-emulator.a: x86_emulate.o
+x86-insn-emulator.a: x86-insn-emulator-fuzzer.o x86_emulate.o
        $(AR) rc $@ $^
 
 afl-x86-insn-emulator-fuzzer: afl-x86-insn-emulator-fuzzer.o x86-insn-emulator-fuzzer.o x86_emulate.o