diff options
author | 2018-10-28 15:21:49 +0000 | |
---|---|---|
committer | 2018-10-28 15:21:49 +0000 | |
commit | 34dd388397bae9ed3b0b31d0334dd349f5178541 (patch) | |
tree | 1620b9b50dd533ce5a8847d27112331317588dd1 | |
parent | Properly handle symlinks. (diff) | |
download | wireguard-openbsd-34dd388397bae9ed3b0b31d0334dd349f5178541.tar.xz wireguard-openbsd-34dd388397bae9ed3b0b31d0334dd349f5178541.zip |
lld generates DT_RUNPATH elements instead of the older DT_RPATH.
Handle both. From semarie@, tweaked by espie@
ok phessler@ espie@
-rw-r--r-- | usr.bin/libtool/LT/Library.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/libtool/LT/Library.pm b/usr.bin/libtool/LT/Library.pm index ae81645c101..8cb18a37de7 100644 --- a/usr.bin/libtool/LT/Library.pm +++ b/usr.bin/libtool/LT/Library.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Library.pm,v 1.12 2015/09/21 08:49:06 ajacoutot Exp $ +# $OpenBSD: Library.pm,v 1.13 2018/10/28 15:21:49 naddy Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # Copyright (c) 2012 Marc Espie <espie@openbsd.org> @@ -191,7 +191,7 @@ sub inspect return @deps; } -# give the list of RPATH directories +# give the list of RPATH/RUNPATH directories sub findrpaths { my $self = shift; @@ -203,16 +203,16 @@ sub findrpaths say "warning: library was specified that could not be found: $self->{key}"; return; } - tsay {"inspecting $filename for non standard RPATH..."}; + tsay {"inspecting $filename for non standard RPATH/RUNPATH..."}; open(my $fh, '-|', "objdump", "-p", "--", $filename); while (<$fh>) { - if (m/RPATH\s+(.*)$/) { + if (m/R(?:UN)?PATH\s+(.*)$/) { @dirs = split(":", $1); last; } } tsay {"found ", (@dirs == 0) ? 'none ' : '', - "RPATH for $filename\n@dirs"}; + "RPATH/RUNPATH for $filename\n@dirs"}; return @dirs; } |