From 98cbcd3ba0b9216a5677271bbf936331644a1218 Mon Sep 17 00:00:00 2001 From: Andrew Gallagher Date: Tue, 31 Oct 2023 11:06:13 -0700 Subject: [PATCH] Don't include undef sym refs when building map of symbol definitions Previously, we'd count undefined symbols references in the map of symbols defined in a binary, which could cause e.g. py-spy to misattribute an undefined ref to `_PyRuntime` in some location other than libpython.so as the definition. --- src/binary_parser.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/binary_parser.rs b/src/binary_parser.rs index 057fed67..356f8354 100644 --- a/src/binary_parser.rs +++ b/src/binary_parser.rs @@ -129,10 +129,18 @@ pub fn parse_binary(filename: &Path, addr: u64, size: u64) -> Result