Searched refs:elf (Results 1 - 25 of 50) sorted by relevance

12

/system/core/libunwindstack/tests/
H A DElfTest.cpp17 #include <elf.h>
111 Elf elf(memory_);
113 ASSERT_FALSE(elf.Init(false));
114 ASSERT_FALSE(elf.valid());
118 Elf elf(memory_);
125 ASSERT_FALSE(elf.Init(false));
126 ASSERT_FALSE(elf.valid());
127 ASSERT_TRUE(elf.interface() == nullptr);
130 ASSERT_FALSE(elf.GetSoname(&name));
133 ASSERT_FALSE(elf
[all...]
H A DMapInfoGetElfTest.cpp17 #include <elf.h>
74 // The map is empty, but this should still create an invalid elf object.
75 Elf* elf = info.GetElf(process_memory_, false); local
76 ASSERT_TRUE(elf != nullptr);
77 ASSERT_FALSE(elf->valid());
87 Elf* elf = info.GetElf(process_memory_, false); local
88 ASSERT_TRUE(elf != nullptr);
89 ASSERT_TRUE(elf->valid());
90 EXPECT_EQ(static_cast<uint32_t>(EM_ARM), elf->machine_type());
91 EXPECT_EQ(ELFCLASS32, elf
101 Elf* elf = info.GetElf(process_memory_, false); local
116 Elf* elf = info.GetElf(process_memory_, false); local
132 Elf* elf = info.GetElf(process_memory_, false); local
148 Elf* elf = info.GetElf(process_memory_, true); local
164 Elf* elf = info.GetElf(process_memory_, true); local
179 Elf* elf = info.GetElf(process_memory_, false); local
209 Elf* elf = info.GetElf(process_memory_, false); local
238 Elf* elf = info.GetElf(process_memory_, false); local
271 Elf* elf = info.GetElf(process_memory_, false); local
299 Elf* elf = info.GetElf(process_memory_, false); local
325 Elf* elf = info.GetElf(process_memory_, false); local
347 Elf* elf = info.GetElf(process_memory_, false); local
401 Elf* elf = info.elf.get(); local
[all...]
H A DElfInterfaceTest.cpp17 #include <elf.h>
133 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_));
152 ASSERT_TRUE(elf->Init(&load_bias));
155 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads();
173 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_));
210 ASSERT_TRUE(elf->Init(&load_bias));
213 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf->pt_loads();
242 std::unique_ptr<ElfInterface> elf(new ElfInterfaceType(&memory_));
279 ASSERT_TRUE(elf->Init(&load_bias));
282 const std::unordered_map<uint64_t, LoadInfo>& pt_loads = elf
[all...]
H A DJitDebugTest.cpp17 #include <elf.h>
60 ElfFake* elf = new ElfFake(memory); variable
61 elf->FakeSetValid(true);
63 elf->FakeSetInterface(interface);
65 map_info->elf.reset(elf);
70 elf = new ElfFake(memory);
71 elf->FakeSetValid(true);
73 elf->FakeSetInterface(interface);
75 map_info->elf
244 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
250 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
257 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
266 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
275 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
286 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
296 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
334 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
351 Elf* elf = jit_debug_->GetElf(maps_.get(), 0x1500); local
[all...]
H A DDexFilesTest.cpp17 #include <elf.h>
62 ElfFake* elf = new ElfFake(memory); variable
63 elf->FakeSetValid(true);
65 elf->FakeSetInterface(interface);
67 map_info->elf.reset(elf);
73 elf = new ElfFake(memory);
74 elf->FakeSetValid(true);
76 elf->FakeSetInterface(interface);
78 map_info->elf
[all...]
H A DMapInfoGetLoadBiasTest.cpp17 #include <elf.h>
72 map_info_->elf.reset(elf_container_.release());
82 map_info_->elf.reset(elf_container_.release());
118 // Now verify that all of the elf files are exactly the same and valid.
125 map_info_->elf.reset(elf_container_.release());
H A DUnwinderTest.cpp17 #include <elf.h>
62 ElfFake* elf = new ElfFake(new MemoryFake); local
63 info->elf.reset(elf);
64 elf->FakeSetInterface(new ElfInterfaceFake(nullptr));
75 elf = new ElfFake(new MemoryFake);
76 info->elf.reset(elf);
77 elf->FakeSetInterface(new ElfInterfaceFake(nullptr));
81 elf
[all...]
/system/core/libunwindstack/
H A DMapInfo.cpp42 // - There is an elf file embedded in a file.
43 // - The whole file is an elf file, and the offset needs to be saved.
46 // a valid elf, then reinit as if the whole file is an elf file.
47 // If the offset is a valid elf, then determine the size of the map
49 // only maps in a portion of the original elf, and never the symbol
60 // Init as if the whole file is an elf.
109 // Make sure no other thread is trying to add the elf to this map.
112 if (elf.get() != nullptr) {
113 return elf
[all...]
H A DJitDebug.cpp78 for (auto* elf : elf_list_) {
79 delete elf;
195 Elf* elf = info->GetElf(memory_, true); local
197 if (elf->GetGlobalVariable(descriptor_name, &descriptor_addr)) {
216 // Search the existing elf object first.
217 for (Elf* elf : elf_list_) {
218 if (elf->IsValidPc(pc)) {
219 return elf;
228 Elf* elf = new Elf(new MemoryRange(memory_, start, size, 0)); local
229 elf
[all...]
H A DUnwinder.cpp18 #include <elf.h>
85 void Unwinder::FillInFrame(MapInfo* map_info, Elf* elf, uint64_t rel_pc, uint64_t func_pc, argument
104 frame->map_load_bias = elf->GetLoadBias();
107 !elf->GetFunctionName(func_pc, &frame->function_name, &frame->function_offset)) {
144 Elf* elf; local
153 elf = map_info->GetElf(process_memory_, true);
154 rel_pc = elf->GetRelPc(regs_->pc(), map_info);
156 pc_adjustment = regs_->GetPcAdjustment(rel_pc, elf);
162 // If the pc is in an invalid elf file, try and get an Elf object
164 if (!elf
[all...]
H A DRegsArm.cpp53 uint64_t RegsArm::GetPcAdjustment(uint64_t rel_pc, Elf* elf) { argument
54 if (!elf->valid()) {
58 uint64_t load_bias = elf->GetLoadBias();
76 if (!elf->memory()->ReadFully(adjusted_rel_pc - 5, &value, sizeof(value)) ||
129 bool RegsArm::StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) { argument
131 Memory* elf_memory = elf->memory();
132 // Read from elf memory since it is usually more expensive to read from
H A DElf.cpp17 #include <elf.h>
169 // The relative pc expectd by StepIfSignalHandler is relative to the start of the elf.
185 // Verify that this is a valid elf file.
263 ALOGI("32 bit elf that is neither arm nor x86 nor mips: e_machine = %d\n", e_machine);
281 ALOGI("64 bit elf that is neither aarch64 nor x86_64 nor mips64: e_machine = %d\n",
332 // named elf file exist.
335 // use the same cached elf object.
338 (*cache_)[info->name] = std::make_pair(info->elf, true);
345 std::make_pair(info->elf, info->elf_offset != 0);
359 // In this case, the whole file is the elf, an
[all...]
/system/core/libunwindstack/tools/
H A Dunwind_symbols.cpp17 #include <elf.h>
68 unwindstack::Elf elf(memory);
69 if (!elf.Init(true) || !elf.valid()) {
70 printf("%s is not a valid elf file.\n", argv[1]);
75 if (elf.GetSoname(&soname)) {
79 switch (elf.machine_type()) {
98 uint64_t load_bias = elf.GetLoadBias();
102 if (!elf.GetFunctionName(func_addr, &cur_name, &func_offset)) {
115 for (const auto& entry : elf
[all...]
H A Dunwind_info.cpp17 #include <elf.h>
116 Elf elf(memory);
117 if (!elf.Init(true) || !elf.valid()) {
118 printf("%s is not a valid elf file.\n", file);
123 if (elf.GetSoname(&soname)) {
127 ElfInterface* interface = elf.interface();
128 if (elf.machine_type() == EM_ARM) {
135 DumpDwarfSection(interface, interface->eh_frame(), elf.GetLoadBias());
143 DumpDwarfSection(interface, interface->debug_frame(), elf
[all...]
H A Dunwind_reg_info.cpp17 #include <elf.h>
147 Elf elf(memory);
148 if (!elf.Init(true) || !elf.valid()) {
149 printf("%s is not a valid elf file.\n", file);
153 ElfInterface* interface = elf.interface();
154 uint64_t load_bias = elf.GetLoadBias();
161 if (elf.GetSoname(&soname)) {
170 PrintRegInformation(section, memory, pc - load_bias, elf.class_type());
178 PrintRegInformation(section, memory, pc - load_bias, elf
[all...]
/system/extras/simpleperf/
H A Dread_elf.cpp144 ElfStatus GetBuildIdFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, BuildId* build_id) { argument
145 for (auto it = elf->section_begin(); it != elf->section_end(); ++it) {
161 if (auto elf = llvm::dyn_cast<llvm::object::ELF32LEObjectFile>(obj)) {
162 return GetBuildIdFromELFFile(elf, build_id);
163 } else if (auto elf = llvm::dyn_cast<llvm::object::ELF64LEObjectFile>(obj)) {
164 return GetBuildIdFromELFFile(elf, build_id);
240 ElfStatus ReadSectionFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, const std::string& section_name, argument
242 for (llvm::object::section_iterator it = elf->section_begin(); it != elf
319 AddSymbolForPltSection(const llvm::object::ELFObjectFile<ELFT>* elf, const std::function<void(const ElfFileSymbol&)>& callback) argument
351 CheckSymbolSections(const llvm::object::ELFObjectFile<ELFT>* elf, bool* has_symtab, bool* has_dynsym) argument
371 ParseSymbolsFromELFFile(const llvm::object::ELFObjectFile<ELFT>* elf, const std::function<void(const ElfFileSymbol&)>& callback) argument
457 ReadMinExecutableVirtualAddress(const llvm::object::ELFFile<ELFT>* elf, uint64_t* p_vaddr) argument
[all...]
/system/core/libunwindstack/include/unwindstack/
H A DRegsArm.h39 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
43 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegsArm64.h39 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
43 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegsMips.h39 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
43 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegsMips64.h39 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
43 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegsX86.h40 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
44 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegsX86_64.h40 uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) override;
44 bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) override;
H A DRegs.h66 virtual uint64_t GetPcAdjustment(uint64_t rel_pc, Elf* elf) = 0;
68 virtual bool StepIfSignalHandler(uint64_t rel_pc, Elf* elf, Memory* process_memory) = 0;
H A DMapInfo.h51 std::shared_ptr<Elf> elf; member in struct:unwindstack::MapInfo
53 // no elf signature found at that offset. This indicates that the
73 // Protect the creation of the elf object.
/system/core/libbacktrace/
H A DUnwindStackMap.cpp109 unwindstack::Elf* elf = map_info->GetElf(process_memory(), true); local
113 if (!elf->GetFunctionName(elf->GetRelPc(pc, map_info), &name, &func_offset)) {

Completed in 262 milliseconds

12