summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2023-10-02 17:57:47 +0100
committerJosh Poimboeuf <jpoimboe@kernel.org>2023-10-23 08:35:01 -0700
commit180af1a5bdaf8d4964837a46a9fce8c3a7fd2d97 (patch)
tree33b09aa7058bad66f68cba096e8a0e4b2b041e56 /scripts
parentf404a58dcf0c862b05602f641ce5fdd8b98fbc3a (diff)
scripts/faddr2line: Don't filter out non-function symbols from readelf
As Josh points out in 20230724234734.zy67gm674vl3p3wv@treble: > Problem is, I think the kernel's symbol printing code prints the > nearest kallsyms symbol, and there are some valid non-FUNC code > symbols. For example, syscall_return_via_sysret. so we shouldn't be considering only 'FUNC'-type symbols in the output from readelf. Drop the function symbol type filtering from the faddr2line outer loop. Suggested-by: Josh Poimboeuf <jpoimboe@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20230724234734.zy67gm674vl3p3wv@treble Signed-off-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20231002165750.1661-2-will@kernel.org Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/faddr2line2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/faddr2line b/scripts/faddr2line
index 0e73aca4f908..a35a420d0f26 100755
--- a/scripts/faddr2line
+++ b/scripts/faddr2line
@@ -260,7 +260,7 @@ __faddr2line() {
DONE=1
- done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$4 == "FUNC" && $8 == fn')
+ done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$8 == fn')
}
[[ $# -lt 2 ]] && usage