def resolve(self, symbol):
with open(self.binary_path, '<STR_LIT:rb>') as f:<EOL><INDENT>elffile = ELFFile(f)<EOL>for section in elffile.iter_sections():<EOL><INDENT>if not isinstance(section, SymbolTableSection):<EOL><INDENT>continue<EOL><DEDENT>symbols = section.get_symbol_by_name(symbol)<EOL>if not symbols:<EOL><INDENT>continue<EOL><DEDENT>return symbols[<NUM_LIT:0>].entry['<STR_LIT>']<EOL><DEDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT>
A helper method used to resolve a symbol name into a memory address when
injecting hooks for analysis.

:param symbol: function name to be resolved
:type symbol: string

:param line: if more functions present, optional line number can be included
:type line: int or None