Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7151545ybi; Mon, 8 Jul 2019 15:41:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd2snVGlDQbSEuUMQtY3KKWVqVfXokUcb+PJr0s+jkNqx6MgaAqdASnkXyDE2PpvHpTkM6 X-Received: by 2002:a17:90b:d8f:: with SMTP id bg15mr28677280pjb.65.1562625668397; Mon, 08 Jul 2019 15:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625668; cv=none; d=google.com; s=arc-20160816; b=sCi3BbrVxp2p7grabYQHAHD8jw/zJ9GeuRIur3h2YTnu0tdSbz/thrgCeIK+Ph8Gpa F6SV/rqy4oSwE9WRxMiZlAIapNAFu5lO43NZAU8Z0R8OszMOxo7lSLCUxSKb4w/oAuJN uPks9uDrqlax7B5Tqtb8WZ39YoCHtdtjBaQ1+xI1+gEjGFRUr7N75kLCnUQySQBuujQ/ paZV/3NfUi/pGcdwBZ+3f5TSVG8Ol0Cifvo2qbUCVfGX6nWNTPq1NgfDPSUIYqmucDbt zLSsorkdkhL6w0oHFJlDB8J3w4oFEry6oo1Lvkuivt7jKQXSjAFz9F0rAhoIz2ZdG30g 7NYQ== 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=Bk01hzHsE60ORPF11SLXpykDb4oO/wApH1udJ8mwSZA=; b=FTeGhPmvur9GPz0yEmVMnSWbXEs1Wfsa7lk15A7gQHwFMvW/+db4HBNWB9RqJPugMU p/t0uL9mcChjoFe6IoMFhhp2DXElA0IPsDJAmZ+rBiNjEf2hzExa9eR3mS57Lm1NTr3z gTuUsE0GUUe1magCgnGOsymI/iMT88S2qUbDYu7nVMPZ2aWoNg49uVFRV0rqIm0kvYUK NnA8LO86pmLVbxSyJAQvJgUkRAOGLNPo0Q2N1uhGqwOxnv15Rxz/6TP31lTUjvuPY8fI iY17prLSTNu/SWiJMe3GboXc+9zyW+tUU4dOlNsIVEn/yiaYKOZ91VoVae/EnezrETzI 9Zhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MZRZc2/l"; 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 z25si19182982pgk.415.2019.07.08.15.40.53; Mon, 08 Jul 2019 15:41:08 -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="MZRZc2/l"; 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 S2390754AbfGHPf7 (ORCPT + 99 others); Mon, 8 Jul 2019 11:35:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:37400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390853AbfGHPfA (ORCPT ); Mon, 8 Jul 2019 11:35:00 -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 7E0F4217D9; Mon, 8 Jul 2019 15:34:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562600099; bh=mRPp/zK5V6l69aHKM5b/TkXMBJAtLcfaKxPp1RIEfOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MZRZc2/lX3pAJiuDj4Bxbz3m45Rl8oyLNsslPgEB8aZ26dmbYILM51gl4JP+46aCo ljKECYwerFHtOGB+4DbHg4Yqw0P606e9V60uyJCTIXG3JQ1oFbmBiymv3g5Radw0mZ fliyGkdL1M+ttX4FTod4umrzCMr4AcvkyTpxaEZI= 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 5.1 51/96] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Date: Mon, 8 Jul 2019 17:13:23 +0200 Message-Id: <20190708150529.278685117@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150526.234572443@linuxfoundation.org> References: <20190708150526.234572443@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 bcdd45df3f51..a7a36209a193 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -73,7 +73,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