diff --git a/spimdisasm/common/ContextSymbols.py b/spimdisasm/common/ContextSymbols.py index 6244de5..2f27f2a 100644 --- a/spimdisasm/common/ContextSymbols.py +++ b/spimdisasm/common/ContextSymbols.py @@ -212,7 +212,7 @@ class ContextSymbol: isMips1Double: bool = False - visibility: str = "global" + visibility: str|None = None @property diff --git a/spimdisasm/common/ElementBase.py b/spimdisasm/common/ElementBase.py index 3d2a1a1..82c3e33 100644 --- a/spimdisasm/common/ElementBase.py +++ b/spimdisasm/common/ElementBase.py @@ -103,7 +103,7 @@ def getLabelFromSymbol(self, sym: ContextSymbol|None, symName: str|None) -> str: if label is None: return "" label += f" {symName or sym.getName()}" - if sym.visibility != "global": + if sym.visibility is not None: label += f", {sym.visibility}" if GlobalConfig.GLABEL_ASM_COUNT: if self.index is not None: diff --git a/spimdisasm/common/SymbolsSegment.py b/spimdisasm/common/SymbolsSegment.py index 1fd5fda..c97a806 100644 --- a/spimdisasm/common/SymbolsSegment.py +++ b/spimdisasm/common/SymbolsSegment.py @@ -609,4 +609,4 @@ def readSplatSymbolAddrs(self, filepath: Path) -> None: if allowBeReferenced is not None: contextSym.allowedToBeReferenced = allowBeReferenced - contextSym.visibility = pairs.get("visibility", contextSym.visibility) + contextSym.visibility = pairs.get("visibility")