Lines Matching refs:elf
29 from elftools.elf.constants import SH_FLAGS
30 from elftools.elf.elffile import ELFFile
31 from elftools.elf.descriptions import describe_ei_data
32 from elftools.elf.sections import SymbolTableSection
102 def extract_elf_code_data_sections(elf, wildcards = None): argument
106 for sect in elf.iter_sections():
126 def find_elf_sections(elf, sh_name): argument
128 for section in elf.iter_sections():
143 def get_kconfig_symbols(elf): argument
145 for section in elf.iter_sections():
154 def find_log_const_symbols(elf): argument
156 symbol_tables = [s for s in elf.iter_sections()
157 if isinstance(s, elftools.elf.sections.SymbolTableSection)]
162 if not isinstance(section, elftools.elf.sections.SymbolTableSection):
231 def extract_elf_information(elf, database): argument
233 e_ident = elf.header['e_ident']
236 if elf_data == elftools.elf.descriptions._DESCR_EI_DATA['ELFDATA2LSB']:
238 elif elf_data == elftools.elf.descriptions._DESCR_EI_DATA['ELFDATA2MSB']:
245 def process_kconfigs(elf, database): argument
247 kconfigs = get_kconfig_symbols(elf)
269 def extract_logging_subsys_information(elf, database, string_mappings): argument
277 section_log_const = find_elf_sections(elf, "log_const_area")
280 section_log_const = find_elf_sections(elf, "log_static_section")
287 log_const_symbols = find_log_const_symbols(elf)
343 def extract_string_variables(elf): argument
348 dwarf_info = elf.get_dwarf_info()
457 def extract_static_strings(elf, database, section_extraction=False): argument
464 elf_sections = extract_elf_code_data_sections(elf, REMOVED_STRING_SECTIONS)
467 str_vars = extract_string_variables(elf)
526 elf = ELFFile(elffile)
542 extract_elf_information(elf, database)
544 process_kconfigs(elf, database)
557 string_mappings = extract_static_strings(elf, database, section_extraction)
568 string_mappings = extract_static_strings(elf, database, section_extraction=True)
570 extract_logging_subsys_information(elf, database, string_mappings)