Commit 793ff5ef authored by Manuel Traut's avatar Manuel Traut Committed by Greg Kroah-Hartman
Browse files

scripts/ prefix addr2line with $CROSS_COMPILE

[ Upstream commit c04e32e9 ]

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: default avatarManuel Traut <>
Acked-by: default avatarKonstantin Khlebnikov <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
Signed-off-by: default avatarSasha Levin <>
parent 675a1a49
......@@ -66,7 +66,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")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment