When using llvm-addr2line in replacement of addr2line, it will output
zero sized symbols, which can shadow other binaries depending on where
their location is (happens with arm-trusted-firmware and its different
binaries). Thus, ignore those symbols.

Reviewed-by: Pierrick Bouvier <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Pierrick Bouvier <[email protected]>
---
 contrib/plugins/uftrace_symbols.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/plugins/uftrace_symbols.py 
b/contrib/plugins/uftrace_symbols.py
index 7d79b81cdec..02d1221228c 100755
--- a/contrib/plugins/uftrace_symbols.py
+++ b/contrib/plugins/uftrace_symbols.py
@@ -45,6 +45,8 @@ def get_symbols(elf_file):
             continue
         addr = int(addr, 16)
         size = int(size, 16)
+        if size == 0:
+            continue
         symbols.append(Symbol(name, addr, size))
     symbols.sort(key = lambda x: x.addr)
     return symbols
-- 
2.47.3


Reply via email to