From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1356 invoked by alias); 22 Aug 2012 21:41:15 -0000 Received: (qmail 1274 invoked by uid 22791); 22 Aug 2012 21:41:12 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from li44-10.members.linode.com (HELO plausible.org) (72.14.181.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Aug 2012 21:40:26 +0000 Received: from cougar.plausible.org (c-67-171-188-207.hsd1.or.comcast.net [67.171.188.207]) (Authenticated sender: andy-wrs) by plausible.org (Postfix) with ESMTPSA id 396AE1F331; Wed, 22 Aug 2012 14:40:25 -0700 (PDT) From: Andy Ross To: binutils@sourceware.org Subject: [PATCH] ld: -rpath/-rpath_link must search under sysroot Date: Wed, 22 Aug 2012 21:41:00 -0000 Message-Id: <1345671602-746-2-git-send-email-andy.ross@windriver.com> In-Reply-To: <1345671602-746-1-git-send-email-andy.ross@windriver.com> References: <1345671602-746-1-git-send-email-andy.ross@windriver.com> Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00390.txt.bz2 The -rpath and -rpath_link arguments would search the host filesystem for libraries, even when a sysroot was defined. For cross toolchains with targets compatible with the host architecture this can find incorrect libraries. Signed-off-by: Andy Ross --- ld/emultempl/elf32.em | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index de51050..79c5bca 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1257,15 +1257,23 @@ EOF fi fragment <