Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp255557ybd; Tue, 25 Jun 2019 20:51:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg6Zxnhs429aYHWwMl3wslDjuwHZQIzbxRX9AnYwbvz0aR8yIdC3tQnhICcaCG0XqysNfX X-Received: by 2002:a17:902:7d86:: with SMTP id a6mr2587974plm.199.1561521090812; Tue, 25 Jun 2019 20:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521090; cv=none; d=google.com; s=arc-20160816; b=YBtmV8boU+88QfF8fQD9YhXc8n2PNCLXref8JNT6GYgsqOFz+m+VxH2adAoUD6fq74 QwTSvBzXK3QJIxYQmqrsMZXUDy9jaKwb4qZaLCdv7ncktbOXk5jzv2239wO/IlWf4pw4 uAIXqtulCHK5z70X6w/oDSYPe/3yxN7jTkz3XY9+ykIu+ZkTYe9TNxCXDPOcs+lS6Nhy 9TAlL08m3cv9e3U5smIFnLTVrT5TCh/ZbrTGlf0J7Er+a8qI4RFhXEpW7NS/7EDKnW0U PeuKXNynpA7DJpBedc2vGCJIOazbexZSsU/GS45gD6vrnjUJtg2Ck6j6+aftCg1aQQUF vtLQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Flx8Bx3wrKVc8jLPQ0GBFgE8VyggT7R/BwHfr8CxfI=; b=sRDoCGkL2esJ7Hzo3xOGfvbGynoXNt4zVaP6bwWDYzi4hly6nLe+B34jCIAFS6F2E+ sR9GsKul2FsQWH7DpL1UMinuiR0amLcmw2dEGTsuyL6D46UzXOMhcDxXpQYmbXRcTTOT WJ44F2Moe39EeJ/6KAVzBPgcl5ndE/BRZJ9gtgmlmsdehtmcu/74SmuJnRq8CSigHugJ txYqOxDuChyJ674ZKz+DewGjHTXShdQSR9gZqrHoWy9yx6rTynUxcSjyg6E2APEcEcJH i1B3G0N3pWDogyIlNzRNRhXM7lXRib7FoI1ICZGrCPXSnwSIFuNQ4H32B7rkFLDs3L/c JI9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t7N7MOjl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si2139861plh.265.2019.06.25.20.51.15; Tue, 25 Jun 2019 20:51:30 -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=t7N7MOjl; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727404AbfFZDtv (ORCPT + 99 others); Tue, 25 Jun 2019 23:49:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:54648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbfFZDn0 (ORCPT ); Tue, 25 Jun 2019 23:43:26 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9DD1220659; Wed, 26 Jun 2019 03:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520605; bh=pvyaoqE/CGwLTREJutyweVUmIWowGZERg9Z0/N5L6U0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t7N7MOjlnYtf6U2LOuZ4Z2AXJOQ9vVJNYyOaPLC3kadYLA/by5JmuvzQxwUrbLpyt 2Vmz1IMXxJf9QueOa4usU4S7m3q8prMtYvLewWPlsop/i5t/bq2l18hC1CIF9nkOLj dZLKCrFGRvIXQOA7rbHW7LdzgwKsxbs7yzzckiKI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Manuel Traut , Konstantin Khlebnikov , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 5.1 47/51] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Date: Tue, 25 Jun 2019 23:41:03 -0400 Message-Id: <20190626034117.23247-47-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manuel Traut [ 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