LKML Archive on
 help / color / Atom feed
From: Manuel Traut <>
Cc:,,, Manuel Traut <>
Subject: [PATCH] scripts/ prefix addr2line with $CROSS_COMPILE
Date: Mon, 27 May 2019 10:34:25 +0200
Message-ID: <> (raw)

At least for ARM64 kernels compiled with the crosstoolchain from
Debian/stretch or with the toolchain from the line number is not
decoded correctly by '':

$ echo "[  136.513051]  f1+0x0/0xc [kcrash]" | \
  CROSS_COMPILE=/opt/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux- \
 ./scripts/ /scratch/linux-arm64/vmlinux \
                                /scratch/linux-arm64 \
[  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

Signed-off-by: Manuel Traut <>
 scripts/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ b/scripts/
index bcdd45df3f51..a7a36209a193 100755
--- a/scripts/
+++ b/scripts/
@@ -73,7 +73,7 @@ parse_symbol() {
 	if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then
 		local code=${cache[$module,$address]}
-		local code=$(addr2line -i -e "$objfile" "$address")
+		local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address")

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  8:34 Manuel Traut [this message]
2019-05-28  8:22 ` Konstantin Khlebnikov
  -- strict thread matches above, loose matches on Subject: below --
2019-01-09 14:47 Manuel Traut

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox