Lines Matching refs:elf
145 ElfStatus GetBuildIdFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, BuildId* build_id) { in GetBuildIdFromELFFile() argument
146 llvm::StringRef data = elf->getData(); in GetBuildIdFromELFFile()
149 for (auto it = elf->section_begin(); it != elf->section_end(); ++it) { in GetBuildIdFromELFFile()
167 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(obj)) { in GetBuildIdFromObjectFile() local
168 return GetBuildIdFromELFFile(elf, build_id); in GetBuildIdFromObjectFile()
169 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(obj)) { in GetBuildIdFromObjectFile() local
170 return GetBuildIdFromELFFile(elf, build_id); in GetBuildIdFromObjectFile()
246 ElfStatus ReadSectionFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, const std::string& s… in ReadSectionFromELFFile() argument
248 for (llvm::object::section_iterator it = elf->section_begin(); it != elf->section_end(); ++it) { in ReadSectionFromELFFile()
329 void AddSymbolForPltSection(const llvm::object::ELFObjectFile<ELFT>* elf, in AddSymbolForPltSection() argument
337 for (auto it = elf->section_begin(); it != elf->section_end(); ++it) { in AddSymbolForPltSection()
344 const auto* shdr = elf->getSection(section_ref.getRawDataRefImpl()); in AddSymbolForPltSection()
361 void CheckSymbolSections(const llvm::object::ELFObjectFile<ELFT>* elf, in CheckSymbolSections() argument
365 for (auto it = elf->section_begin(); it != elf->section_end(); ++it) { in CheckSymbolSections()
381 ElfStatus ParseSymbolsFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, in ParseSymbolsFromELFFile() argument
383 auto machine = elf->getELFFile()->getHeader()->e_machine; in ParseSymbolsFromELFFile()
385 AddSymbolForPltSection(elf, callback); in ParseSymbolsFromELFFile()
390 CheckSymbolSections(elf, &has_symtab, &has_dynsym); in ParseSymbolsFromELFFile()
391 if (has_symtab && elf->symbol_begin() != elf->symbol_end()) { in ParseSymbolsFromELFFile()
392 ReadSymbolTable(elf->symbol_begin(), elf->symbol_end(), callback, is_arm, elf->section_end()); in ParseSymbolsFromELFFile()
395 elf->dynamic_symbol_begin()->getRawDataRefImpl() != llvm::object::DataRefImpl()) { in ParseSymbolsFromELFFile()
396 ReadSymbolTable(elf->dynamic_symbol_begin(), elf->dynamic_symbol_end(), callback, is_arm, in ParseSymbolsFromELFFile()
397 elf->section_end()); in ParseSymbolsFromELFFile()
400 ElfStatus result = ReadSectionFromELFFile(elf, ".gnu_debugdata", &debugdata); in ParseSymbolsFromELFFile()
410 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromELFFile() local
411 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromELFFile()
412 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromELFFile() local
413 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromELFFile()
460 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromEmbeddedElfFile() local
461 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromEmbeddedElfFile()
462 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromEmbeddedElfFile() local
463 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromEmbeddedElfFile()
475 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromElfFileInMemory() local
476 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromElfFileInMemory()
477 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ParseSymbolsFromElfFileInMemory() local
478 return ParseSymbolsFromELFFile(elf, callback); in ParseSymbolsFromElfFileInMemory()
484 ElfStatus ParseDynamicSymbolsFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, in ParseDynamicSymbolsFromELFFile() argument
486 auto machine = elf->getELFFile()->getHeader()->e_machine; in ParseDynamicSymbolsFromELFFile()
488 ReadSymbolTable(elf->dynamic_symbol_begin(), elf->dynamic_symbol_end(), callback, is_arm, in ParseDynamicSymbolsFromELFFile()
489 elf->section_end()); in ParseDynamicSymbolsFromELFFile()
500 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ParseDynamicSymbolsFromElfFile() local
501 return ParseDynamicSymbolsFromELFFile(elf, callback); in ParseDynamicSymbolsFromElfFile()
502 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ParseDynamicSymbolsFromElfFile() local
503 return ParseDynamicSymbolsFromELFFile(elf, callback); in ParseDynamicSymbolsFromElfFile()
509 ElfStatus ReadMinExecutableVirtualAddress(const llvm::object::ELFFile<ELFT>* elf, in ReadMinExecutableVirtualAddress() argument
514 for (auto it = elf->program_header_begin(); it != elf->program_header_end(); ++it) { in ReadMinExecutableVirtualAddress()
559 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ReadMinExecutableVirtualAddressFromEmbeddedElfFile() local
560 return ReadMinExecutableVirtualAddress(elf->getELFFile(), min_vaddr, file_offset_of_min_vaddr); in ReadMinExecutableVirtualAddressFromEmbeddedElfFile()
561 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ReadMinExecutableVirtualAddressFromEmbeddedElfFile() local
562 return ReadMinExecutableVirtualAddress(elf->getELFFile(), min_vaddr, file_offset_of_min_vaddr); in ReadMinExecutableVirtualAddressFromEmbeddedElfFile()
578 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(wrapper.obj)) { in ReadSectionFromElfFile() local
579 return ReadSectionFromELFFile(elf, section_name, content); in ReadSectionFromElfFile()
580 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(wrapper.obj)) { in ReadSectionFromElfFile() local
581 return ReadSectionFromELFFile(elf, section_name, content); in ReadSectionFromElfFile()