def binary_symbols(binary):
def substr_after(string, delim):<EOL><INDENT>return string.partition(delim)[<NUM_LIT:2>]<EOL><DEDENT>with open(binary, '<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 = [sym.name for sym in section.iter_symbols() if sym]<EOL>return [substr_after(name, PREPEND_SYM) for name in symbols<EOL>if name.startswith(PREPEND_SYM)]<EOL><DEDENT><DEDENT>
helper method for getting all binary symbols with SANDSHREW_ prepended.
We do this in order to provide the symbols Manticore should hook on to
perform main analysis.

:param binary: str for binary to instrospect.
:rtype list: list of symbols from binary