This commit is contained in:
J. Nick Koston
2026-02-08 11:20:54 -06:00
parent 95e92716d9
commit 17664750b7
+5 -4
View File
@@ -57,8 +57,9 @@ SymbolInfoType = tuple[str, int, str]
# RAM sections - symbols in these sections consume RAM
RAM_SECTIONS = frozenset([".data", ".bss"])
# nm symbol types for global/weak defined symbols (used for library symbol mapping)
_NM_DEFINED_GLOBAL_TYPES = frozenset({"T", "D", "B", "R", "W", "V"})
# nm symbol types for defined symbols (used for library symbol mapping)
# Uppercase = global, lowercase = local/static, W/V = weak
_NM_DEFINED_SYMBOL_TYPES = frozenset({"T", "t", "D", "d", "B", "b", "R", "r", "W", "V"})
@dataclass
@@ -525,8 +526,8 @@ class MemoryAnalyzer:
sym_type = parts[-2]
sym_name = parts[-1]
# Include global defined symbols (uppercase) and weak symbols (W/V)
if sym_type in _NM_DEFINED_GLOBAL_TYPES:
# Include all defined symbols (global, local, and weak)
if sym_type in _NM_DEFINED_SYMBOL_TYPES:
symbol_map[sym_name] = lib_name
return symbol_map