File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,17 @@ command -v ${ADDR2LINE} >/dev/null 2>&1 || die "${ADDR2LINE} isn't installed"
8585# init/main.c! This only works for vmlinux. Otherwise it falls back to
8686# printing the absolute path.
8787find_dir_prefix () {
88- local objfile=$1
89-
9088 local start_kernel_addr=$( echo " ${ELF_SYMS} " | sed ' s/\[.*\]//' |
9189 ${AWK} ' $8 == "start_kernel" {printf "0x%s", $2}' )
9290 [[ -z $start_kernel_addr ]] && return
9391
94- local file_line= $( ${ADDR2LINE} -e $objfile $start_kernel_addr )
95- [[ -z $file_line ]] && return
92+ run_addr2line ${start_kernel_addr} " "
93+ [[ -z $ADDR2LINE_OUT ]] && return
9694
95+ local file_line=${ADDR2LINE_OUT#* at }
96+ if [[ -z $file_line ]] || [[ $file_line = $ADDR2LINE_OUT ]]; then
97+ return
98+ fi
9799 local prefix=${file_line% init/ main.c:* }
98100 if [[ -z $prefix ]] || [[ $prefix = $file_line ]]; then
99101 return
@@ -350,7 +352,7 @@ echo "${ELF_SECHEADERS}" | ${GREP} -q '\.debug_info' || die "CONFIG_DEBUG_INFO n
350352init_addr2line $objfile
351353
352354DIR_PREFIX=supercalifragilisticexpialidocious
353- find_dir_prefix $objfile
355+ find_dir_prefix
354356
355357FIRST=1
356358while [[ $# -gt 0 ]]; do
You can’t perform that action at this time.
0 commit comments