summaryrefslogtreecommitdiff
path: root/lib/fuzzing
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2021-09-04 10:30:56 +0300
committerAndrew Bartlett <abartlet@samba.org>2021-09-09 00:53:54 +0000
commitf94b1d3b31f2fb5bdbfce7b5f79d80f098b91975 (patch)
treecfd7852225917bc5188dd368f2293d04ff1793a3 /lib/fuzzing
parent541f9ee5ab66b41a2a8d9c54183b095ad99f3769 (diff)
downloadsamba-f94b1d3b31f2fb5bdbfce7b5f79d80f098b91975.tar.gz
fuzzing/oss-fuzz: fix samba build script for Ubuntu 20.04
Add a linker flag to generate fuzzer binaries with an RPATH header instead of RUNPATH. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/fuzzing')
-rwxr-xr-xlib/fuzzing/oss-fuzz/do_build.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fuzzing/oss-fuzz/do_build.sh b/lib/fuzzing/oss-fuzz/do_build.sh
index 3cd4c12546b..b1e009a0577 100755
--- a/lib/fuzzing/oss-fuzz/do_build.sh
+++ b/lib/fuzzing/oss-fuzz/do_build.sh
@@ -77,12 +77,15 @@ esac
# $LIB_FUZZING_ENGINE is provided by the oss-fuzz "compile" command
#
+# --disable-new-dtags linker flag creates fuzzer binaries with RPATH
+# header instead of RUNPATH header. Modern linkers use RUNPATH by
+# default.
./configure -C --without-gettext --enable-debug --enable-developer \
--enable-libfuzzer \
$SANITIZER_ARG \
--disable-warnings-as-errors \
--abi-check-disable \
- --fuzz-target-ldflags="$LIB_FUZZING_ENGINE" \
+ --fuzz-target-ldflags="-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \
--nonshared-binary=ALL \
"$@" \
LINK_CC="$CXX"