From patchwork Thu Mar 16 14:23:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Grandegger X-Patchwork-Id: 739845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vkW230Qcbz9rvt for ; Fri, 17 Mar 2017 01:24:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4D61B25C6F; Thu, 16 Mar 2017 14:24:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AESUZJYLREpO; Thu, 16 Mar 2017 14:24:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 052DE25D37; Thu, 16 Mar 2017 14:24:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BC47C1C27B8 for ; Thu, 16 Mar 2017 14:23:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BA70289BC4 for ; Thu, 16 Mar 2017 14:23:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2xlWqMzDtSr for ; Thu, 16 Mar 2017 14:23:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailproxy03.manitu.net (mailproxy03.manitu.net [217.11.48.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id A903589E0A for ; Thu, 16 Mar 2017 14:23:40 +0000 (UTC) Received: from onex.fritz.box (aftr-88-217-180-211.dynamic.mnet-online.de [88.217.180.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wg@grandegger.com) by mailproxy03.manitu.net (Postfix) with ESMTPSA id 074D1D49212; Thu, 16 Mar 2017 15:23:38 +0100 (CET) From: Wolfgang Grandegger To: buildroot@buildroot.org Date: Thu, 16 Mar 2017 15:23:27 +0100 Message-Id: <1489674207-6876-10-git-send-email-wg@grandegger.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489674207-6876-1-git-send-email-wg@grandegger.com> References: <1489674207-6876-1-git-send-email-wg@grandegger.com> Cc: Wolfgang Grandegger Subject: [Buildroot] [RFC PATCH v2 9/9] support/scripts: check-host-rpath now handles $ORIGIN as well X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" "$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 --- 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' \