aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2017-11-21 18:47:18 +0100
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2017-11-21 18:23:35 +0000
commit2ad15073446ebaf59f1a9186bf1f6a5e55613d68 (patch)
treea9311cde243a121253746cbf67e7f6c4d8caec25
parent0b2ecccd863b577335c1c87a902783d3de158839 (diff)
oss-fuzzshark: fix linking issues due to register_all_protocols() removed from -lepan
During compilation of oss-fuzzshark (https://github.com/google/oss-fuzz/issues/1003): Step #3: /src/wireshark/tools/oss-fuzzshark/fuzzshark.c:213: undefined reference to `register_all_protocols' Step #3: /src/wireshark/tools/oss-fuzzshark/fuzzshark.c:213: undefined reference to `register_all_protocol_handoffs' After cleanup of make-dissector-reg.py [b695b3e2f72998d66ca4b7a6826d4ce1688060c8] these functions are no longer part of epan library (I really wonder why...). oss-fuzzshark need to compile and link register.c on their own. Change-Id: I79adf5c1513a0934f140bbf501c181bf14d7619b Reviewed-on: https://code.wireshark.org/review/24523 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
-rwxr-xr-xtools/oss-fuzzshark/build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/oss-fuzzshark/build.sh b/tools/oss-fuzzshark/build.sh
index 6164cd3..394fd79 100755
--- a/tools/oss-fuzzshark/build.sh
+++ b/tools/oss-fuzzshark/build.sh
@@ -43,7 +43,7 @@ generate_fuzzer()
-c -o $WORK/${fuzzer_name}.o \
$fuzzer_cflags
- $CXX $CXXFLAGS $WORK/${fuzzer_name}.o \
+ $CXX $CXXFLAGS $WORK/register.o $WORK/${fuzzer_name}.o \
-o $OUT/${fuzzer_name} \
${WIRESHARK_FUZZERS_COMMON_FLAGS}
@@ -57,6 +57,10 @@ WIRESHARK_FUZZERS_COMMON_FLAGS="-lFuzzingEngine \
-L"$WIRESHARK_INSTALL_PATH/lib" -lwireshark -lwiretap -lwsutil \
-Wl,-Bstatic `pkg-config --libs glib-2.0` -pthread -lpcre -lgcrypt -lgpg-error -lz -Wl,-Bdynamic"
+$CC $CFLAGS -I $SRC/wireshark/ `pkg-config --cflags glib-2.0` \
+ $SRC/wireshark/register.c \
+ -c -o $WORK/register.o
+
for dissector in $FUZZ_DISSECTORS; do
generate_fuzzer "${dissector}" -DFUZZ_DISSECTOR_TARGET=\"$dissector\"
done