Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Xiong Nandi and committed by
Andrew Morton
b41838fe 1fcce6b8

+2 -1
+2 -1
scripts/decode_stacktrace.sh
··· 30 30 31 31 READELF=${UTIL_PREFIX}readelf${UTIL_SUFFIX} 32 32 ADDR2LINE=${UTIL_PREFIX}addr2line${UTIL_SUFFIX} 33 + NM=${UTIL_PREFIX}nm${UTIL_SUFFIX} 33 34 34 35 if [[ $1 == "-r" ]] ; then 35 36 vmlinux="" ··· 159 158 if [[ $aarray_support == true && "${cache[$module,$name]+isset}" == "isset" ]]; then 160 159 local base_addr=${cache[$module,$name]} 161 160 else 162 - local base_addr=$(nm "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') 161 + local base_addr=$(${NM} "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}') 163 162 if [[ $base_addr == "" ]] ; then 164 163 # address not found 165 164 return