diff options
author | Uri Simchoni <uri@samba.org> | 2021-09-04 10:11:58 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-09-09 00:53:54 +0000 |
commit | 541f9ee5ab66b41a2a8d9c54183b095ad99f3769 (patch) | |
tree | 56c21714f5177dde6be41b1aa3922e7f7a9fa476 /lib/fuzzing | |
parent | e608dcd2d6736505022d0f9d1e008333bb70f1af (diff) | |
download | samba-541f9ee5ab66b41a2a8d9c54183b095ad99f3769.tar.gz |
fuzzing/oss-fuzz: fix RPATH comments for post-Ubuntu-16.04 era
Remove what appears to be a copy+paste error in one place, and
explain that RPATH/RUNPATH is set by the linker, not by chrpath
utility.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/fuzzing')
-rwxr-xr-x | lib/fuzzing/oss-fuzz/check_build.sh | 3 | ||||
-rwxr-xr-x | lib/fuzzing/oss-fuzz/do_build.sh | 14 |
2 files changed, 6 insertions, 11 deletions
diff --git a/lib/fuzzing/oss-fuzz/check_build.sh b/lib/fuzzing/oss-fuzz/check_build.sh index 501c2c813fc..98b83a81bbf 100755 --- a/lib/fuzzing/oss-fuzz/check_build.sh +++ b/lib/fuzzing/oss-fuzz/check_build.sh @@ -25,8 +25,7 @@ do # Confirm that the chrpath was reset to lib/ in the same directory # as the binary. RPATH (not RUNPATH) is critical, otherwise # libraries used by libraries won't be found on the oss-fuzz - # target host, but is only possible with clang or ld.bfd on Ubuntu - # 16.04 (this script is only run on that). + # target host. chrpath -l $bin | grep 'RPATH=$ORIGIN/lib' # Confirm that we link to at least some libraries in this diff --git a/lib/fuzzing/oss-fuzz/do_build.sh b/lib/fuzzing/oss-fuzz/do_build.sh index 4c6796d2350..3cd4c12546b 100755 --- a/lib/fuzzing/oss-fuzz/do_build.sh +++ b/lib/fuzzing/oss-fuzz/do_build.sh @@ -254,16 +254,12 @@ do cp $x $OUT/ bin=`basename $x` - # Changing RPATH (not RUNPATH, but we can't tell here which was - # set) is critical, otherwise libraries used by libraries won't be - # found on the oss-fuzz target host. Sadly this is only possible - # with clang or ld.bfd on Ubuntu 16.04 (this script is only run on - # that). + # This means the copied libraries are found on the runner. # - # chrpath --convert only allows RPATH to be changed to RUNPATH, - # not the other way around, and we really don't want RUNPATH. - # - # This means the copied libraries are found on the runner + # The binaries should we built with RPATH, not RUNPATH, to allow + # libraries used by libraries to be found. This command retains the + # RPATH/RUNPATH header and only changes the path. We later verify this + # in the check_build.sh script. chrpath -r '$ORIGIN/lib' $OUT/$bin # Truncate the original binary to save space |