faddr2line (8bb5e7f4dcd9b9ef22a3ea25c9066a8a968f12dd) | faddr2line (b6a5068854cfe372da7dee3224dcf023ed5b00cb) |
---|---|
1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3# 4# Translate stack dump function offsets. 5# 6# addr2line doesn't work with KASLR addresses. This works similarly to 7# addr2line, but instead takes the 'func+0x123' format as input: 8# --- 98 unchanged lines hidden (view full) --- 107 DONE=1 108 return 109 fi 110 111 # vmlinux uses absolute addresses in the section table rather than 112 # section offsets. 113 local file_type=$(${READELF} --file-header $objfile | 114 ${AWK} '$1 == "Type:" { print $2; exit }') | 1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3# 4# Translate stack dump function offsets. 5# 6# addr2line doesn't work with KASLR addresses. This works similarly to 7# addr2line, but instead takes the 'func+0x123' format as input: 8# --- 98 unchanged lines hidden (view full) --- 107 DONE=1 108 return 109 fi 110 111 # vmlinux uses absolute addresses in the section table rather than 112 # section offsets. 113 local file_type=$(${READELF} --file-header $objfile | 114 ${AWK} '$1 == "Type:" { print $2; exit }') |
115 [[ $file_type = "EXEC" ]] && is_vmlinux=1 | 115 if [[ $file_type = "EXEC" ]] || [[ $file_type == "DYN" ]]; then 116 is_vmlinux=1 117 fi |
116 117 # Go through each of the object's symbols which match the func name. 118 # In rare cases there might be duplicates, in which case we print all 119 # matches. 120 while read line; do 121 local fields=($line) 122 local sym_addr=0x${fields[1]} 123 local sym_elf_size=${fields[2]} --- 166 unchanged lines hidden --- | 118 119 # Go through each of the object's symbols which match the func name. 120 # In rare cases there might be duplicates, in which case we print all 121 # matches. 122 while read line; do 123 local fields=($line) 124 local sym_addr=0x${fields[1]} 125 local sym_elf_size=${fields[2]} --- 166 unchanged lines hidden --- |