/system/unwinding/libunwindstack/tests/ |
D | ElfInterfaceTest.cpp | 528 Shdr shdr = {}; in SonameInit() local 529 shdr.sh_type = SHT_STRTAB; in SonameInit() 531 shdr.sh_addr = 0x20100; in SonameInit() 533 shdr.sh_addr = 0x10100; in SonameInit() 535 shdr.sh_offset = 0x10000; in SonameInit() 536 memory_.SetMemory(0x200 + sizeof(shdr), &shdr, sizeof(shdr)); in SonameInit() 784 Shdr shdr = {}; in InitSectionHeadersMalformedSymData() local 785 shdr.sh_type = SHT_SYMTAB; in InitSectionHeadersMalformedSymData() 786 shdr.sh_link = 4; in InitSectionHeadersMalformedSymData() 787 shdr.sh_addr = 0x5000; in InitSectionHeadersMalformedSymData() [all …]
|
D | GenGnuDebugdata.cpp | 56 Shdr shdr; in GenElf() local 57 memset(&shdr, 0, sizeof(shdr)); in GenElf() 58 shdr.sh_name = 0; in GenElf() 59 shdr.sh_type = SHT_NULL; in GenElf() 60 TEMP_FAILURE_RETRY(write(fd, &shdr, sizeof(Shdr))); in GenElf() 63 memset(&shdr, 0, sizeof(shdr)); in GenElf() 64 shdr.sh_type = SHT_PROGBITS; in GenElf() 65 shdr.sh_name = 11; in GenElf() 66 shdr.sh_addr = 0x5000; in GenElf() 67 shdr.sh_offset = 0x5000; in GenElf() [all …]
|
D | ElfTestUtils.cpp | 73 Shdr shdr; in TestInitGnuDebugdata() local 74 memset(&shdr, 0, sizeof(shdr)); in TestInitGnuDebugdata() 75 shdr.sh_type = SHT_NULL; in TestInitGnuDebugdata() 76 copy_func(offset, &shdr, sizeof(shdr)); in TestInitGnuDebugdata() 84 memset(&shdr, 0, sizeof(shdr)); in TestInitGnuDebugdata() 85 shdr.sh_name = 1; in TestInitGnuDebugdata() 86 shdr.sh_type = SHT_STRTAB; in TestInitGnuDebugdata() 87 shdr.sh_offset = symtab_offset; in TestInitGnuDebugdata() 88 shdr.sh_size = 0x100; in TestInitGnuDebugdata() 89 copy_func(offset, &shdr, sizeof(shdr)); in TestInitGnuDebugdata() [all …]
|
D | MapInfoGetBuildIDTest.cpp | 156 Elf32_Shdr shdr = {}; in InitElfData() local 157 shdr.sh_type = SHT_NOTE; in InitElfData() 158 shdr.sh_name = 0x500; in InitElfData() 159 shdr.sh_offset = 0xb000; in InitElfData() 160 shdr.sh_size = sizeof(note_section); in InitElfData() 161 offset += ehdr.e_shoff + sizeof(shdr); in InitElfData() 163 ASSERT_EQ(static_cast<ssize_t>(sizeof(shdr)), write(fd, &shdr, sizeof(shdr))); in InitElfData() 166 memset(&shdr, 0, sizeof(shdr)); in InitElfData() 167 shdr.sh_type = SHT_STRTAB; in InitElfData() 168 shdr.sh_name = 0x20000; in InitElfData() [all …]
|
D | JitDebugTest.cpp | 106 ShdrType shdr; in CreateElf() local 107 memset(&shdr, 0, sizeof(shdr)); in CreateElf() 108 shdr.sh_type = SHT_NULL; in CreateElf() 109 memory_->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in CreateElf() 111 sh_offset += sizeof(shdr); in CreateElf() 112 memset(&shdr, 0, sizeof(shdr)); in CreateElf() 113 shdr.sh_type = SHT_STRTAB; in CreateElf() 114 shdr.sh_name = 1; in CreateElf() 115 shdr.sh_offset = 0x500; in CreateElf() 116 shdr.sh_size = 0x100; in CreateElf() [all …]
|
D | UnwinderTest.cpp | 1703 Elf32_Shdr shdr = {}; in TEST_F() local 1704 shdr.sh_type = SHT_NULL; in TEST_F() 1705 memory_->SetMemory(0xf7100, &shdr, sizeof(shdr)); in TEST_F() 1707 shdr.sh_type = SHT_SYMTAB; in TEST_F() 1708 shdr.sh_link = 2; in TEST_F() 1709 shdr.sh_addr = 0x300; in TEST_F() 1710 shdr.sh_offset = 0x300; in TEST_F() 1711 shdr.sh_entsize = sizeof(Elf32_Sym); in TEST_F() 1712 shdr.sh_size = shdr.sh_entsize; in TEST_F() 1713 memory_->SetMemory(0xf7100 + sizeof(shdr), &shdr, sizeof(shdr)); in TEST_F() [all …]
|
/system/unwinding/libunwindstack/ |
D | ElfInterface.cpp | 285 ShdrType shdr; in ReadSectionHeaders() local 288 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() 289 sec_offset = shdr.sh_offset; in ReadSectionHeaders() 290 sec_size = shdr.sh_size; in ReadSectionHeaders() 297 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() 301 if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) { in ReadSectionHeaders() 305 if (shdr.sh_link >= ehdr.e_shnum) { in ReadSectionHeaders() 308 uint64_t str_offset = ehdr.e_shoff + shdr.sh_link * ehdr.e_shentsize; in ReadSectionHeaders() 315 symbols_.push_back(new Symbols(shdr.sh_offset, shdr.sh_size, shdr.sh_entsize, in ReadSectionHeaders() 317 } else if ((shdr.sh_type == SHT_PROGBITS || shdr.sh_type == SHT_NOBITS) && sec_size != 0) { in ReadSectionHeaders() [all …]
|
/system/unwinding/libunwindstack/tests/fuzz/ |
D | UnwinderComponentCreator.cpp | 265 ShdrType shdr; in PutElfInMemory() local 266 memset(&shdr, 0, sizeof(shdr)); in PutElfInMemory() 267 shdr.sh_type = SHT_NULL; in PutElfInMemory() 268 memory->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in PutElfInMemory() 270 sh_offset += sizeof(shdr); in PutElfInMemory() 271 memset(&shdr, 0, sizeof(shdr)); in PutElfInMemory() 272 shdr.sh_type = SHT_STRTAB; in PutElfInMemory() 273 shdr.sh_name = 1; in PutElfInMemory() 274 shdr.sh_offset = 0x500; in PutElfInMemory() 275 shdr.sh_size = 0x100; in PutElfInMemory() [all …]
|
/system/extras/simpleperf/ |
D | read_elf.cpp | 275 const auto* shdr = elf->getSection(section_ref.getRawDataRefImpl()); in AddSymbolForPltSection() local 276 if (shdr == nullptr) { in AddSymbolForPltSection() 280 symbol.vaddr = shdr->sh_addr; in AddSymbolForPltSection() 281 symbol.len = shdr->sh_size; in AddSymbolForPltSection() 347 const auto& shdr = section_headers[i]; in GetSectionHeader() local 348 if (auto name = elf_->getSectionName(&shdr); name) { in GetSectionHeader() 351 sections[i].vaddr = shdr.sh_addr; in GetSectionHeader() 352 sections[i].file_offset = shdr.sh_offset; in GetSectionHeader() 353 sections[i].size = shdr.sh_size; in GetSectionHeader()
|