Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7152095ybi; Mon, 8 Jul 2019 15:41:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzUG72xDg/Uruotubiy7L52KLWaBkGR4RhWGr+j0L9yfLgc7MMHdy8q0R/e7BHX7nJbDJa X-Received: by 2002:a17:90a:c68c:: with SMTP id n12mr21175006pjt.29.1562625713589; Mon, 08 Jul 2019 15:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625713; cv=none; d=google.com; s=arc-20160816; b=OcnmlmPI+UPKp/Fu3a9Jf4x/qTDkQHrHp4YCpfg0v47zp8Q0VPd/CCQsE3woa0FfOM RvWxQ0pXgudXhT00KHGQdLxiI0RrcFi2sIkKTJbwJPQsirlrXc4SLbkVFiDKBa+q5EZL dAqXQ91Rpd8agOHSFEykmCQMfZGaB+/nmva7KcNN2WpAtlj81nce7M6dYz4Vfu5Mpqi1 6BesTejol2wyawl4Uzk3o46JkNFqAi/yuMgFdUrecY7HFixrwBxyy6gPnBHR16hDZz5H 8YXt4e7ICEqN9JQesQBtZI+J8tyBn7lvCsQutgUORLeY+KZcPW82QQ+7qt2p5J9wCL1k 6HjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=346Frv8iy/NSqopaZjeQ9bgIfQADyp85vA6RUwrQnHQ=; b=0O1Ccsg6SeNqRoZ8QkIlTK6KeCOPW918mEcQaNtWyqUOOaj3LS8b6Dl09ASqPfWwyH gxwBoJouZQg2+MgpccJCR8LEGHPaTy+a9KmH818QqPnmYI1yXQNKyVqrtN6twEC2YOfH VU7ojsQl0+kZwljMHrJn/sH8M6uWCqKOA01wxyxuDVJFj2QGlrRlj7zes0eNuc7SNlNy xtemc3z1gAdO9KoUh1STfhP2N4+/iQF38HBItD2bjWTyWkCtLucNxGWSV186Xe4HcVQB UDI50nOd3wmMEfyxhKTmpl38up1R94mUNsjC/Uk/T/iKdjmhvbZB9wDbnLLWDmlDz7Ej Fpuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r2fbSZVo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s29si21916072pfd.147.2019.07.08.15.41.38; Mon, 08 Jul 2019 15:41:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r2fbSZVo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403842AbfGHPnn (ORCPT + 99 others); Mon, 8 Jul 2019 11:43:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388268AbfGHPYE (ORCPT ); Mon, 8 Jul 2019 11:24:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C770820665; Mon, 8 Jul 2019 15:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599443; bh=Jf1+iatCgaO6rrc3+qO2ZmSaM2eKhCmZ7LKlJBJ7WLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r2fbSZVo6iz6RrWPmOVa5KyfdjQxK6BsIGW66qkOgg+Y2kE6BiNVGSHz5Z52/0fP6 KrDRFDwstMWaeUFvlFuBY3QU6HMPVBS8u28IyoU/L4VhtEgtkzX8gunApizTesLibi mcoOeiubF+MoMPjbA8nMXRmxRImS0tnBLEBNSEH8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manuel Traut , Konstantin Khlebnikov , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.14 17/56] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Date: Mon, 8 Jul 2019 17:13:09 +0200 Message-Id: <20190708150520.032620312@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150514.376317156@linuxfoundation.org> References: <20190708150514.376317156@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit c04e32e911653442fc834be6e92e072aeebe01a1 ] At least for ARM64 kernels compiled with the crosstoolchain from Debian/stretch or with the toolchain from kernel.org the line number is not decoded correctly by 'decode_stacktrace.sh': $ echo "[ 136.513051] f1+0x0/0xc [kcrash]" | \ CROSS_COMPILE=/opt/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux- \ ./scripts/decode_stacktrace.sh /scratch/linux-arm64/vmlinux \ /scratch/linux-arm64 \ /nfs/debian/lib/modules/4.20.0-devel [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:68) kcrash If addr2line from the toolchain is used the decoded line number is correct: [ 136.513051] f1 (/linux/drivers/staging/kcrash/kcrash.c:57) kcrash Link: http://lkml.kernel.org/r/20190527083425.3763-1-manut@linutronix.de Signed-off-by: Manuel Traut Acked-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/decode_stacktrace.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 98a7d63a723e..c4a9ddb174bc 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -66,7 +66,7 @@ parse_symbol() { if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then local code=${cache[$module,$address]} else - local code=$(addr2line -i -e "$objfile" "$address") + local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address") cache[$module,$address]=$code fi -- 2.20.1