/system/unwinding/libunwindstack/tests/ |
D | ElfTest.cpp | 115 Elf elf(elf_memory_); in TEST_F() local 117 ASSERT_FALSE(elf.Init()); in TEST_F() 118 ASSERT_FALSE(elf.valid()); in TEST_F() 122 Elf elf(elf_memory_); in TEST_F() local 129 ASSERT_FALSE(elf.Init()); in TEST_F() 130 ASSERT_FALSE(elf.valid()); in TEST_F() 131 ASSERT_TRUE(elf.interface() == nullptr); in TEST_F() 133 ASSERT_EQ("", elf.GetSoname()); in TEST_F() 137 ASSERT_FALSE(elf.GetFunctionName(0, &name, &func_offset)); in TEST_F() 139 ASSERT_FALSE(elf.StepIfSignalHandler(0, nullptr, nullptr)); in TEST_F() [all …]
|
D | MapInfoGetElfTest.cpp | 76 Elf* elf = info->GetElf(process_memory_, ARCH_ARM); in TEST_F() local 77 ASSERT_TRUE(elf != nullptr); in TEST_F() 78 ASSERT_FALSE(elf->valid()); in TEST_F() 87 Elf* elf = info->GetElf(process_memory_, ARCH_ARM); in TEST_F() local 88 ASSERT_TRUE(elf != nullptr); in TEST_F() 89 ASSERT_TRUE(elf->valid()); in TEST_F() 90 EXPECT_EQ(static_cast<uint32_t>(EM_ARM), elf->machine_type()); in TEST_F() 91 EXPECT_EQ(ELFCLASS32, elf->class_type()); in TEST_F() 95 elf = info->GetElf(std::shared_ptr<Memory>(), ARCH_ARM); in TEST_F() 96 ASSERT_TRUE(elf != nullptr); in TEST_F() [all …]
|
D | ElfInterfaceTest.cpp | 183 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(memory_)); in SinglePtLoad() local 200 ASSERT_TRUE(elf->Init(&load_bias)); in SinglePtLoad() 203 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in SinglePtLoad() 221 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(memory_)); in MultipleExecutablePtLoads() local 256 ASSERT_TRUE(elf->Init(&load_bias)); in MultipleExecutablePtLoads() 259 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in MultipleExecutablePtLoads() 288 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(memory_)); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr() local 323 ASSERT_TRUE(elf->Init(&load_bias)); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr() 326 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads(); in MultipleExecutablePtLoadsIncrementsNotSizeOfPhdr() 357 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(memory_)); in NonExecutablePtLoads() local [all …]
|
D | JitDebugTest.cpp | 41 ElfFake* elf = new ElfFake(fake_memory); in CreateFakeElf() local 42 elf->FakeSetValid(true); in CreateFakeElf() 44 elf->FakeSetInterface(interface); in CreateFakeElf() 49 map_info->set_elf(elf); in CreateFakeElf() 257 Elf* elf = jit_debug_->Find(maps_.get(), 0x1500); in TEST_F() local 258 ASSERT_TRUE(elf == nullptr); in TEST_F() 263 Elf* elf = jit_debug_->Find(maps_.get(), 0x1500); in TEST_F() local 264 ASSERT_TRUE(elf == nullptr); in TEST_F() 270 Elf* elf = jit_debug_->Find(maps_.get(), 0x1500); in TEST_F() local 271 ASSERT_TRUE(elf == nullptr); in TEST_F() [all …]
|
D | VerifyBionicTerminationTest.cpp | 76 Elf elf(file_memory); in VerifyReturnAddress() local 78 ASSERT_TRUE(elf.Init()) << "Failed to init elf object from " << frame.map_info->name().c_str(); in VerifyReturnAddress() 79 ASSERT_TRUE(elf.valid()) << "Elf " << frame.map_info->name().c_str() << " is not valid."; in VerifyReturnAddress() 80 ElfInterface* interface = elf.interface(); in VerifyReturnAddress()
|
D | UnwinderTest.cpp | 49 const char* name, Elf* elf = nullptr) { in AddMapInfo() argument 53 if (elf != nullptr) { in AddMapInfo() 54 map_info->set_elf(elf); in AddMapInfo() 65 ElfFake* elf; in SetUpTestSuite() local 72 elf = new ElfFake(elf_memory); in SetUpTestSuite() 75 elf->FakeSetInterface(interface); in SetUpTestSuite() 76 AddMapInfo(0x1000, 0x8000, 0, PROT_READ | PROT_WRITE, "/system/fake/libc.so", elf); in SetUpTestSuite() 83 elf = new ElfFake(elf_memory); in SetUpTestSuite() 84 elf->FakeSetInterface(new ElfInterfaceFake(empty)); in SetUpTestSuite() 85 AddMapInfo(0x20000, 0x22000, 0, PROT_READ | PROT_WRITE, "/system/fake/libunwind.so", elf); in SetUpTestSuite() [all …]
|
D | MapInfoTest.cpp | 43 EXPECT_TRUE(map_info->elf().get() == nullptr); in TEST() 59 EXPECT_TRUE(map_info->elf().get() == nullptr); in TEST() 128 ElfFake* elf = new ElfFake(empty); in TEST() local 130 elf->FakeSetInterface(interface); in TEST() 134 map_info->set_elf(elf); in TEST()
|
/system/unwinding/libunwindstack/tools/ |
D | unwind_info.cpp | 43 void DumpArm(Elf* elf, ElfInterfaceArm* interface) { in DumpArm() argument 50 uint64_t load_bias = elf->GetLoadBias(); in DumpArm() 58 if (elf->GetFunctionName(pc + load_bias, &name, &func_offset) && !name.empty()) { in DumpArm() 87 void DumpDwarfSection(Elf* elf, DwarfSection* section, uint64_t) { in DumpDwarfSection() argument 97 if (elf->GetFunctionName(fde->pc_start, &name, &func_offset) && !name.empty()) { in DumpDwarfSection() 101 if (!section->Log(2, UINT64_MAX, fde, elf->arch())) { in DumpDwarfSection() 109 Elf elf(elf_memory); in GetElfInfo() local 110 if (!elf.Init() || !elf.valid()) { in GetElfInfo() 115 std::string soname(elf.GetSoname()); in GetElfInfo() 120 std::string build_id = elf.GetBuildID(); in GetElfInfo() [all …]
|
D | unwind_reg_info.cpp | 182 Elf elf(elf_memory); in GetInfo() local 183 if (!elf.Init() || !elf.valid()) { in GetInfo() 188 ElfInterface* interface = elf.interface(); in GetInfo() 189 uint64_t load_bias = elf.GetLoadBias(); in GetInfo() 195 std::string soname(elf.GetSoname()); in GetInfo() 203 if (elf.GetFunctionName(pc, &function_name, &function_offset)) { in GetInfo() 208 if (elf.machine_type() == EM_ARM) { in GetInfo() 215 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 223 PrintRegInformation(section, elf.memory(), pc, elf.class_type(), elf.arch()); in GetInfo() 230 ElfInterface* gnu_debugdata_interface = elf.gnu_debugdata_interface(); in GetInfo() [all …]
|
D | unwind_symbols.cpp | 62 unwindstack::Elf elf(elf_memory); in main() local 63 if (!elf.Init() || !elf.valid()) { in main() 68 std::string soname(elf.GetSoname()); in main() 73 switch (elf.machine_type()) { in main() 98 if (!elf.GetFunctionName(func_addr, &cur_name, &func_offset)) { in main() 111 for (const auto& entry : elf.interface()->pt_loads()) { in main() 117 if (elf.GetFunctionName(addr, &cur_name, &func_offset)) { in main()
|
/system/extras/simpleperf/ |
D | read_elf_test.cpp | 70 auto elf = ElfFile::Open(GetTestData(ELF_FILE), &status); in TEST() local 72 ASSERT_EQ(ElfStatus::NO_ERROR, elf->GetBuildId(&build_id)); in TEST() 81 auto elf = ElfFile::Open(GetTestData(path), &status); in TEST() local 83 ASSERT_EQ(ElfStatus::NO_ERROR, elf->GetBuildId(&build_id)); in TEST() 113 auto elf = ElfFile::Open(GetTestData(ELF_FILE), &elf_file_build_id, &status); in TEST() local 116 elf->ParseSymbols(std::bind(ParseSymbol, std::placeholders::_1, &symbols))); in TEST() 125 auto elf = ElfFile::Open(GetTestData(ELF_FILE), &status); in TEST() local 128 elf->ParseSymbols(std::bind(ParseSymbol, std::placeholders::_1, &symbols))); in TEST() 134 elf = ElfFile::Open(GetTestData(ELF_FILE), &build_id, &status); in TEST() 137 elf->ParseSymbols(std::bind(ParseSymbol, std::placeholders::_1, &symbols))); in TEST() [all …]
|
D | read_elf.cpp | 217 static inline const typename ELFT::Ehdr& GetELFHeader(const llvm::object::ELFFile<ELFT>* elf) { in GetELFHeader() argument 218 return elf->getHeader(); in GetELFHeader() 223 const llvm::object::ELFFile<ELFT>* elf) { in GetELFProgramHeaders() argument 224 return elf->program_headers(); in GetELFProgramHeaders() 229 const llvm::object::ELFFile<ELFT>* elf, const typename ELFT::Shdr& section_header) { in GetELFSectionName() argument 230 return elf->getSectionName(section_header); in GetELFSectionName() 298 void AddSymbolForPltSection(const llvm::object::ELFObjectFile<ELFT>* elf, in AddSymbolForPltSection() argument 306 for (auto it = elf->section_begin(); it != elf->section_end(); ++it) { in AddSymbolForPltSection() 312 const auto* shdr = elf->getSection(section_ref.getRawDataRefImpl()); in AddSymbolForPltSection() 329 void CheckSymbolSections(const llvm::object::ELFObjectFile<ELFT>* elf, bool* has_symtab, in CheckSymbolSections() argument [all …]
|
D | read_apk.cpp | 47 std::unique_ptr<EmbeddedElf> elf = FindElfInApkByOffsetWithoutCache(apk_path, file_offset); in FindElfInApkByOffset() local 48 EmbeddedElf* result = elf.get(); in FindElfInApkByOffset() 49 node.offset_map[file_offset] = std::move(elf); in FindElfInApkByOffset() 63 std::unique_ptr<EmbeddedElf> elf = FindElfInApkByNameWithoutCache(apk_path, entry_name); in FindElfInApkByName() local 64 EmbeddedElf* result = elf.get(); in FindElfInApkByName() 67 node.offset_map[result->entry_offset()] = std::move(elf); in FindElfInApkByName()
|
D | dso.cpp | 100 auto elf = ElfFile::Open(path, &status); in CollectBuildIdInDir() local 101 if (status == ElfStatus::NO_ERROR && elf->GetBuildId(&build_id) == ElfStatus::NO_ERROR) { in CollectBuildIdInDir() 119 auto elf = ElfFile::Open(path, &status); in CheckDebugFilePath() local 120 if (!elf) { in CheckDebugFilePath() 124 status = elf->GetBuildId(&debug_build_id); in CheckDebugFilePath() 577 auto elf = ElfFile::Open(GetDebugFilePath(), &build_id, &status); in GetMinExecutableVaddr() local 578 if (elf) { in GetMinExecutableVaddr() 579 min_vaddr_ = elf->ReadMinExecutableVaddr(&file_offset_of_min_vaddr_); in GetMinExecutableVaddr() 642 auto elf = ElfFile::Open(GetDebugFilePath(), &build_id, &status); in LoadSymbolsImpl() local 643 if (elf) { in LoadSymbolsImpl() [all …]
|
/system/unwinding/libunwindstack/ |
D | Unwinder.cpp | 146 Elf* elf; in Unwind() local 156 elf = nullptr; in Unwind() 165 elf = map_info->GetElf(process_memory_, arch_); in Unwind() 167 rel_pc = elf->GetRelPc(step_pc, map_info.get()); in Unwind() 173 pc_adjustment = GetPcAdjustment(rel_pc, elf, arch_); in Unwind() 181 if (!elf->valid() && jit_debug_ != nullptr && (map_info->flags() & PROT_EXEC)) { in Unwind() 187 elf = jit_elf; in Unwind() 207 frame = FillInFrame(map_info, elf, rel_pc, pc_adjustment); in Unwind() 232 if (elf->StepIfSignalHandler(rel_pc, regs_, process_memory_.get())) { in Unwind() 235 } else if (elf->Step(step_pc, regs_, process_memory_.get(), &finished, in Unwind() [all …]
|
D | JitDebug.cpp | 28 uint64_t size, /*out*/ std::shared_ptr<Elf>& elf) { in Load() argument 34 elf.reset(new Elf(copy)); in Load() 35 return elf->Init() && elf->valid(); in Load()
|
D | MapInfo.cpp | 280 if (elf().get() != nullptr) { in GetElf() 281 return elf().get(); in GetElf() 287 return elf().get(); in GetElf() 292 elf().reset(new Elf(elf_memory)); in GetElf() 295 elf()->Init(); in GetElf() 296 if (elf()->valid() && expected_arch != elf()->arch()) { in GetElf() 298 elf()->Invalidate(); in GetElf() 301 if (!elf()->valid()) { in GetElf() 312 if (prev_real_map->elf() == nullptr) { in GetElf() 314 prev_real_map->set_elf(elf()); in GetElf() [all …]
|
D | AndroidVersions.md | 22 By default, lld creates two separate maps of the elf in memory, one read-only 36 to add the linker option `-Wl,-zseparate-code` to avoid creating an elf 49 elf files with this format only ever occurs if the file was generated 57 * Be permissive of badly formed elf files. Previously, any detected error 68 contain elf data. The first is read-only and contains the elf header data, 70 contains the executable code from the elf. Before this, the unwinder 72 contained the elf header data and the executable code. 73 * Build ID information for elf objects added. This will display the 74 NT\_GNU\_BUILD\_ID note found in elf files. This information can be used 82 elf file as Dwarf 4. It does not support the new dwarf ops in Dwarf 5. [all …]
|
D | Regs.cpp | 175 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf, ArchEnum arch) { in GetPcAdjustment() argument 178 if (!elf->valid()) { in GetPcAdjustment() 182 uint64_t load_bias = elf->GetLoadBias(); in GetPcAdjustment() 200 if (!elf->memory()->ReadFully(adjusted_rel_pc - 5, &value, sizeof(value)) || in GetPcAdjustment()
|
D | Global.cpp | 84 Elf* elf = map_zero->GetElf(memory_, arch()); in FindAndReadVariable() local 86 if (elf->GetGlobalVariableOffset(variable, &ptr) && ptr != 0) { in FindAndReadVariable()
|
/system/memory/libmeminfo/libelf64/tests/page_size_16kb/ |
D | elf_alignment_test.cpp | 63 static void LoadAlignmentCb(const android::elf64::Elf64Binary& elf) { in LoadAlignmentCb() argument 75 if (elf.path.starts_with(dir)) { in LoadAlignmentCb() 79 for (int i = 0; i < elf.phdrs.size(); i++) { in LoadAlignmentCb() 80 Elf64_Phdr phdr = elf.phdrs[i]; in LoadAlignmentCb() 89 << " " << elf.path << " is not at least 16KiB aligned"; in LoadAlignmentCb()
|
/system/unwinding/libunwindstack/benchmarks/ |
D | ElfBenchmark.cpp | 43 unwindstack::Elf elf(file_memory); in RunBenchmark() local 44 if (!elf.Init() || !elf.valid()) { in RunBenchmark() 94 unwindstack::Elf* elf = build_id_map_info->GetElf(std::shared_ptr<unwindstack::Memory>(), in BM_elf_get_build_id_from_object() local 96 if (!elf->valid()) { in BM_elf_get_build_id_from_object()
|
D | SymbolBenchmark.cpp | 43 unwindstack::Elf elf(elf_memory); in RunBenchmark() local 44 if (!elf.Init() || !elf.valid()) { in RunBenchmark() 52 bool found = elf.GetFunctionName(pc, &name, &offset); in RunBenchmark()
|
/system/unwinding/libunwindstack/tests/fuzz/ |
D | UnwinderComponentCreator.cpp | 56 const char* name, Elf* elf = nullptr) { in ElfAddMapInfo() argument 59 if (elf != nullptr) { in ElfAddMapInfo() 61 map_info->set_elf(elf); in ElfAddMapInfo() 65 void ElfPushFakeFunctionData(FuzzedDataProvider* data_provider, ElfInterfaceFake* elf) { in ElfPushFakeFunctionData() argument 71 elf->FakeSetGlobalVariable(func_name, data_provider->ConsumeIntegral<uint64_t>()); in ElfPushFakeFunctionData() 90 ElfFake* elf = new ElfFake(memory); in PopulateElfFake() local 100 elf->FakeSetArch(GetArch(data_provider)); in PopulateElfFake() 101 elf->FakeSetLoadBias(data_provider->ConsumeIntegral<uint64_t>()); in PopulateElfFake() 106 elf->FakeSetInterface(interface_fake); in PopulateElfFake() 108 return elf; in PopulateElfFake()
|
/system/core/trusty/secretkeeper/ |
D | Android.bp | 69 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"", 82 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"", 95 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"",
|