From: Andrew Bartlett Date: Sat, 7 Dec 2019 18:44:45 +0000 (+1300) Subject: lib/fuzzing Add comments to explain RUNPATH manipulation in build.sh X-Git-Tag: ldb-2.1.0~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e5d18c5b1e710a747ede56efe10792957f11552;p=thirdparty%2Fsamba.git lib/fuzzing Add comments to explain RUNPATH manipulation in build.sh Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/lib/fuzzing/oss-fuzz/build_samba.sh b/lib/fuzzing/oss-fuzz/build_samba.sh index f76955aeb73..2c09ba323ef 100755 --- a/lib/fuzzing/oss-fuzz/build_samba.sh +++ b/lib/fuzzing/oss-fuzz/build_samba.sh @@ -57,6 +57,11 @@ for x in bin/fuzz_* do cp $x $OUT/ bin=`basename $x` + + # Copy any system libraries needed by this fuzzer to $OUT/lib ldd $OUT/$bin | cut -f 2 -d '>' | cut -f 1 -d \( | cut -f 2 -d ' ' | xargs -i cp \{\} $OUT/lib/ + + # Change RUNPATH so that the copied libraries are found on the + # runner chrpath -r '$ORIGIN/lib' $OUT/$bin done