Bases: object
This class exposes the different elements that can be configured to assemble code.
Bases: Enum
The different supported dialects
The dialect of the input assembly code
This function aims to be overloaded in order to resolve symbols used in the assembly listing.
For instance, given this assembly code:
0x1000: mov rdi, rbx
0x1003: call _my_function
The function _my_function
will remain undefined unless we return its
address in resolve_symbol()
:
class MyConfig(lief.assembly.AssemblerConfig):
def __init__(self):
super().__init__() # This is important
@override
def resolve_symbol(self, name: str) -> int | None:
if name == '_my_function':
return 0x4000
return None # Or super().resolve_symbol(name)