diff options
author | Xiong Nandi <xndchn@gmail.com> | 2024-05-24 06:25:59 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-06-25 07:25:00 +0200 |
commit | b41838fe11ce1d2d994210c2c79582499c53e0ca (patch) | |
tree | d79708f7290656e057d67ba1f83503bcb4dfbd5b /scripts/decode_stacktrace.sh | |
parent | bcachefs: remove heap-related macros and switch to generic min_heap (diff) | |
download | linux-b41838fe11ce1d2d994210c2c79582499c53e0ca.tar.xz linux-b41838fe11ce1d2d994210c2c79582499c53e0ca.zip |
scripts/decode_stacktrace.sh: wrap nm with UTIL_PREFIX and UTIL_SUFFIX
Patch series "scripts/decode_stacktrace.sh: better support to ARM32".
This patch (of 2):
Since System.map is generated by cross-compile nm tool, we should use it here
too. Otherwise host nm may not recognize ARM Thumb-2 instruction address well.
Link: https://lkml.kernel.org/r/20240524042600.14738-1-xndchn@gmail.com
Link: https://lkml.kernel.org/r/20240524042600.14738-2-xndchn@gmail.com
Signed-off-by: Xiong Nandi <xndchn@gmail.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Cc: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
-rwxr-xr-x | scripts/decode_stacktrace.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index fa5be6f57b00..2bc3a54ffba5 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -30,6 +30,7 @@ fi READELF=${UTIL_PREFIX}readelf${UTIL_SUFFIX} ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} +NM=${UTIL_PREFIX}nm${UTIL_SUFFIX} if [[ $1 == "-r" ]] ; then vmlinux="" @@ -158,7 +159,7 @@ parse_symbol() { if [[ $aarray_support == true && "${cache[$module,$name]+isset}" == "isset" ]]; then local base_addr=${cache[$module,$name]} else - local base_addr=$(nm "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') + local base_addr=$(${NM} "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') if [[ $base_addr == "" ]] ; then # address not found return |