• Home
  • Raw
  • Download

Lines Matching refs:memory

205 bool Elf::IsValidElf(Memory* memory) {  in IsValidElf()  argument
206 if (memory == nullptr) { in IsValidElf()
212 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf()
222 bool Elf::GetInfo(Memory* memory, uint64_t* size) { in GetInfo() argument
223 if (!IsValidElf(memory)) { in GetInfo()
229 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo()
235 ElfInterface32::GetMaxSize(memory, size); in GetInfo()
237 ElfInterface64::GetMaxSize(memory, size); in GetInfo()
278 ElfInterface* Elf::CreateInterfaceFromMemory(Memory* memory) { in CreateInterfaceFromMemory() argument
279 if (!IsValidElf(memory)) { in CreateInterfaceFromMemory()
284 if (!memory->ReadFully(EI_CLASS, &class_type_, 1)) { in CreateInterfaceFromMemory()
289 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf32_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
296 interface.reset(new ElfInterfaceArm(memory)); in CreateInterfaceFromMemory()
299 interface.reset(new ElfInterface32(memory)); in CreateInterfaceFromMemory()
302 interface.reset(new ElfInterface32(memory)); in CreateInterfaceFromMemory()
310 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
327 interface.reset(new ElfInterface64(memory)); in CreateInterfaceFromMemory()
333 int64_t Elf::GetLoadBias(Memory* memory) { in GetLoadBias() argument
334 if (!IsValidElf(memory)) { in GetLoadBias()
339 if (!memory->Read(EI_CLASS, &class_type, 1)) { in GetLoadBias()
344 return ElfInterface::GetLoadBias<Elf32_Ehdr, Elf32_Phdr>(memory); in GetLoadBias()
346 return ElfInterface::GetLoadBias<Elf64_Ehdr, Elf64_Phdr>(memory); in GetLoadBias()
426 std::string Elf::GetBuildID(Memory* memory) { in GetBuildID() argument
427 if (!IsValidElf(memory)) { in GetBuildID()
432 if (!memory->Read(EI_CLASS, &class_type, 1)) { in GetBuildID()
437 return ElfInterface::ReadBuildIDFromMemory<Elf32_Ehdr, Elf32_Shdr, Elf32_Nhdr>(memory); in GetBuildID()
439 return ElfInterface::ReadBuildIDFromMemory<Elf64_Ehdr, Elf64_Shdr, Elf64_Nhdr>(memory); in GetBuildID()