Symbols: Set symbol_shift default rather than None

Since all the checks for symbol_shift use essentially "if not
config['symbol_shift']" is doesn't matter whether 0 or None is
returned.  I'd like to test this on an ASLR image, but I think it should
be fine and I'd feel much happier about everything if we could give it a
numeric default.
This commit is contained in:
Mike Auty
2021-03-21 00:21:13 +00:00
parent 2402a51c60
commit 792fb7080c
+2 -1
View File
@@ -303,7 +303,8 @@ class SymbolTableInterface(BaseSymbolTableInterface, configuration.ConfigurableI
@classmethod
def get_requirements(cls) -> List[RequirementInterface]:
return super().get_requirements() + [
requirements.IntRequirement(name = 'symbol_shift', description = 'Symbol Shift', optional = True),
requirements.IntRequirement(
name = 'symbol_shift', description = 'Symbol Shift', optional = True, default = 0),
requirements.IntRequirement(
name = 'symbol_mask', description = 'Address mask for symbols', optional = True, default = 0),
]