def __populate_symbols(self):
if not self._ptr:<EOL><INDENT>raise BfdException("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>symbols = _bfd.get_symbols(self._ptr)<EOL>sections = {}<EOL>for section in self.sections:<EOL><INDENT>sections[self.sections[section].index] = self.sections[section]<EOL><DEDENT>for symbol in symbols:<EOL><INDENT>symbol_section_index = symbol[<NUM_LIT:0>]<EOL>symbol_name = symbol[<NUM_LIT:1>]<EOL>symbol_value = symbol[<NUM_LIT:2>]<EOL>symbol_flags = symbol[<NUM_LIT:3>]<EOL>symbol_flags = tuple(<EOL>[f for f in SYMBOL_FLAGS_LIST if symbol_flags & f == f] )<EOL>new_symbol = Symbol(<EOL>sections.get(symbol_section_index, None),<EOL>symbol_name,<EOL>symbol_value,<EOL>symbol_flags)<EOL>if new_symbol.section is None:<EOL><INDENT>continue<EOL><DEDENT>symbol_address = new_symbol.section.vma + new_symbol.value<EOL>self._symbols[symbol_address] = new_symbol<EOL><DEDENT>del sections<EOL><DEDENT>except BfdSectionException as err:<EOL><INDENT>raise BfdException("<STR_LIT>")<EOL><DEDENT>
Get a list of the symbols present in the bfd to populate our
        internal list.