[Buildroot] [RFC PATCH v5 10/11] support/scripts: check-host-rpath now handles $ORIGIN as well
Arnout Vandecappelle
arnout at mind.be
Sat Jul 1 17:12:34 UTC 2017
On 30-06-17 10:37, Wolfgang Grandegger wrote:
> "$ORIGIN/../../usr/lib" is also a valid RPATH for binaries in
> "$hostdir/usr/bin". After RPATH sanitation, all RPATH
> directories start with "$ORIGIN".
>
> Signed-off-by: Wolfgang Grandegger <wg at grandegger.com>
This patch should come way earlier in the series, because things break if you
don't have this and the sanitization is done.
In fact, it can be applied right away:
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
Regards,
Arnout
> ---
> support/scripts/check-host-rpath | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
> index 6ce547c..020c123 100755
> --- a/support/scripts/check-host-rpath
> +++ b/support/scripts/check-host-rpath
> @@ -58,7 +58,7 @@ check_elf_has_rpath() {
> for dir in ${rpath//:/ }; do
> # Remove duplicate and trailing '/' for proper match
> dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
> - [ "${dir}" = "${hostdir}/usr/lib" ] && return 0
> + [ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0
> done
> done < <( readelf -d "${file}" \
> |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
More information about the buildroot
mailing list