Home
last modified time | relevance | path

Searched refs:shdr (Results 1 – 7 of 7) sorted by relevance

/system/core/libunwindstack/tests/
DElfInterfaceTest.cpp500 Shdr shdr = {}; in SonameInit() local
501 shdr.sh_type = SHT_STRTAB; in SonameInit()
503 shdr.sh_addr = 0x20100; in SonameInit()
505 shdr.sh_addr = 0x10100; in SonameInit()
507 shdr.sh_offset = 0x10000; in SonameInit()
508 memory_.SetMemory(0x200 + sizeof(shdr), &shdr, sizeof(shdr)); in SonameInit()
756 Shdr shdr = {}; in InitSectionHeadersMalformedSymData() local
757 shdr.sh_type = SHT_SYMTAB; in InitSectionHeadersMalformedSymData()
758 shdr.sh_link = 4; in InitSectionHeadersMalformedSymData()
759 shdr.sh_addr = 0x5000; in InitSectionHeadersMalformedSymData()
[all …]
DGenGnuDebugdata.cpp56 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 …]
DElfTestUtils.cpp73 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 …]
DMapInfoGetBuildIDTest.cpp154 Elf32_Shdr shdr = {}; in InitElfData() local
155 shdr.sh_type = SHT_NOTE; in InitElfData()
156 shdr.sh_name = 0x500; in InitElfData()
157 shdr.sh_offset = 0xb000; in InitElfData()
158 shdr.sh_size = sizeof(note_section); in InitElfData()
159 offset += ehdr.e_shoff + sizeof(shdr); in InitElfData()
161 ASSERT_EQ(static_cast<ssize_t>(sizeof(shdr)), write(fd, &shdr, sizeof(shdr))); in InitElfData()
164 memset(&shdr, 0, sizeof(shdr)); in InitElfData()
165 shdr.sh_type = SHT_STRTAB; in InitElfData()
166 shdr.sh_name = 0x20000; in InitElfData()
[all …]
DJitDebugTest.cpp100 ShdrType shdr; in CreateElf() local
101 memset(&shdr, 0, sizeof(shdr)); in CreateElf()
102 shdr.sh_type = SHT_NULL; in CreateElf()
103 memory_->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in CreateElf()
105 sh_offset += sizeof(shdr); in CreateElf()
106 memset(&shdr, 0, sizeof(shdr)); in CreateElf()
107 shdr.sh_type = SHT_STRTAB; in CreateElf()
108 shdr.sh_name = 1; in CreateElf()
109 shdr.sh_offset = 0x500; in CreateElf()
110 shdr.sh_size = 0x100; in CreateElf()
[all …]
/system/core/libunwindstack/
DElfInterface.cpp301 ShdrType shdr; in ReadSectionHeaders() local
304 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
305 sec_offset = shdr.sh_offset; in ReadSectionHeaders()
306 sec_size = shdr.sh_size; in ReadSectionHeaders()
313 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
317 if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) { in ReadSectionHeaders()
321 if (shdr.sh_link >= ehdr.e_shnum) { in ReadSectionHeaders()
324 uint64_t str_offset = ehdr.e_shoff + shdr.sh_link * ehdr.e_shentsize; in ReadSectionHeaders()
331 symbols_.push_back(new Symbols(shdr.sh_offset, shdr.sh_size, shdr.sh_entsize, in ReadSectionHeaders()
333 } else if (shdr.sh_type == SHT_PROGBITS && sec_size != 0) { in ReadSectionHeaders()
[all …]
/system/extras/simpleperf/
Dread_elf.cpp344 const auto* shdr = elf->getSection(section_ref.getRawDataRefImpl()); in AddSymbolForPltSection() local
345 if (shdr == nullptr) { in AddSymbolForPltSection()
349 symbol.vaddr = shdr->sh_addr; in AddSymbolForPltSection()
350 symbol.len = shdr->sh_size; in AddSymbolForPltSection()