/aosp12/system/unwinding/libunwindstack/ |
H A D | ElfInterface.cpp | 288 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() 289 sec_offset = shdr.sh_offset; in ReadSectionHeaders() 323 debug_frame_offset_ = shdr.sh_offset; in ReadSectionHeaders() 327 gnu_debugdata_offset_ = shdr.sh_offset; in ReadSectionHeaders() 330 eh_frame_offset_ = shdr.sh_offset; in ReadSectionHeaders() 334 eh_frame_hdr_offset_ = shdr.sh_offset; in ReadSectionHeaders() 338 data_offset_ = shdr.sh_offset; in ReadSectionHeaders() 360 gnu_build_id_offset_ = shdr.sh_offset; in ReadSectionHeaders() 551 if (!memory->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in GetBuildIDInfo() 554 sec_offset = shdr.sh_offset; in GetBuildIDInfo() [all …]
|
/aosp12/art/libelffile/elf/ |
H A D | elf_debug_reader.h | 76 const char* name = Read<char>(sections_[header_->e_shstrndx].sh_offset + section.sh_name); in ElfDebugReader() 83 auto compressed = Read<uint8_t>(gnu_debugdata->sh_offset, gnu_debugdata->sh_size); in ElfDebugReader() 129 for (const Elf_Sym& symbol : Read<Elf_Sym>(symtab->sh_offset, count)) { in VisitFunctionSymbols() 131 visit_sym(symbol, Read<char>(strtab->sh_offset + symbol.st_name)); in VisitFunctionSymbols() 147 for (const Elf_Sym& symbol : Read<Elf_Sym>(dynsym->sh_offset, count)) { in VisitDynamicSymbols() 148 visit_sym(symbol, Read<char>(dynstr->sh_offset + symbol.st_name)); in VisitDynamicSymbols() 158 const CFI* entry = Read<CFI>(debug_frame->sh_offset + offset); in VisitDebugFrame() 161 visit_cie(Read<CIE>(debug_frame->sh_offset + offset)); in VisitDebugFrame() 163 const FDE* fde = Read<FDE>(debug_frame->sh_offset + offset); in VisitDebugFrame() 164 visit_fde(fde, Read<CIE>(debug_frame->sh_offset + fde->cie_pointer)); in VisitDebugFrame()
|
H A D | elf_builder.h | 136 CHECK_EQ(header_.sh_offset, 0u); in Start() 137 header_.sh_offset = owner_->AlignFileOffset(align); in Start() 155 DCHECK_GE(file_offset, (off_t)header_.sh_offset); in GetPosition() 156 return file_offset - header_.sh_offset; in GetPosition() 554 if (section->header_.sh_offset == 0) { in End() 613 section->header_.sh_offset = 0; in Strip() 618 DCHECK_LE(section->header_.sh_offset, end + kPageSize) << "Large gap between sections"; in Strip() 619 end = std::max<off_t>(end, section->header_.sh_offset + section->header_.sh_size); in Strip() 917 load.p_offset = shdr.sh_offset; in MakeProgramHeaders() 927 Elf_Word size = shdr.sh_offset + shdr.sh_size - prev.p_offset; in MakeProgramHeaders() [all …]
|
/aosp12/system/unwinding/libunwindstack/tests/ |
H A D | ElfInterfaceTest.cpp | 788 shdr.sh_offset = 0x5000; in InitSectionHeadersMalformedSymData() 798 shdr.sh_offset = 0x6000; in InitSectionHeadersMalformedSymData() 808 shdr.sh_offset = 0x6000; in InitSectionHeadersMalformedSymData() 818 shdr.sh_offset = 0xf000; in InitSectionHeadersMalformedSymData() 861 shdr.sh_offset = 0x5000; in InitSectionHeaders() 871 shdr.sh_offset = 0x6000; in InitSectionHeaders() 887 shdr.sh_offset = 0xf000; in InitSectionHeaders() 1432 shdr.sh_offset = 0x500; in TEST_F() 1442 shdr.sh_offset = 0x600; in TEST_F() 1489 shdr.sh_offset = 0x500; in TEST_F() [all …]
|
H A D | JitDebugTest.cpp | 96 uint64_t sh_offset = sizeof(ehdr); in CreateElf() local 101 ehdr.e_shoff = sh_offset; in CreateElf() 109 memory_->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in CreateElf() 111 sh_offset += sizeof(shdr); in CreateElf() 115 shdr.sh_offset = 0x500; in CreateElf() 117 memory_->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in CreateElf() 121 sh_offset += sizeof(shdr); in CreateElf() 126 shdr.sh_offset = 0x600; in CreateElf() 128 memory_->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in CreateElf() 130 sh_offset += sizeof(shdr); in CreateElf() [all …]
|
H A D | GenGnuDebugdata.cpp | 67 shdr.sh_offset = 0x5000; in GenElf() 76 shdr.sh_offset = 0x200; in GenElf()
|
H A D | ElfTestUtils.cpp | 87 shdr.sh_offset = symtab_offset; in TestInitGnuDebugdata() 129 shdr.sh_offset = offset; in TestInitGnuDebugdata()
|
H A D | MapInfoGetBuildIDTest.cpp | 159 shdr.sh_offset = 0xb000; in InitElfData() 169 shdr.sh_offset = 0xf000; in InitElfData()
|
H A D | MapInfoCreateMemoryTest.cpp | 45 static void InitElf(int fd, uint64_t file_offset, uint64_t sh_offset, uint8_t class_type) { in InitElf() argument 53 ehdr.e_shoff = sh_offset; in InitElf()
|
H A D | MapInfoGetElfTest.cpp | 52 static void InitElf(uint64_t sh_offset, Ehdr* ehdr, uint8_t class_type, uint8_t machine_type) { in InitElf() argument 57 ehdr->e_shoff = sh_offset; in InitElf()
|
H A D | UnwinderTest.cpp | 1710 shdr.sh_offset = 0x300; in TEST_F() 1718 shdr.sh_offset = 0x400; in TEST_F()
|
/aosp12/frameworks/compile/mclinker/lib/LD/ |
H A D | ELFReader.cpp | 334 uint32_t sh_offset = 0x0; in readSectionHeaders() local 370 sh_offset = shdr->sh_offset; in readSectionHeaders() 373 sh_offset = mcld::bswap32(shdr->sh_offset); in readSectionHeaders() 389 sh_offset = shdrTab[idx].sh_offset; in readSectionHeaders() 398 sh_offset = mcld::bswap32(shdrTab[idx].sh_offset); in readSectionHeaders() 408 section->setOffset(sh_offset); in readSectionHeaders() 828 uint64_t sh_offset = 0x0; in readSectionHeaders() local 864 sh_offset = shdr->sh_offset; in readSectionHeaders() 867 sh_offset = mcld::bswap64(shdr->sh_offset); in readSectionHeaders() 883 sh_offset = shdrTab[idx].sh_offset; in readSectionHeaders() [all …]
|
H A D | ELFObjectWriter.cpp | 319 shdr[sectIdx].sh_offset = ld_sect->offset(); in emitSectionHeader()
|
/aosp12/system/unwinding/libunwindstack/tests/fuzz/ |
H A D | UnwinderComponentCreator.cpp | 255 uint64_t sh_offset = sizeof(ehdr); in PutElfInMemory() local 260 ehdr.e_shoff = sh_offset; in PutElfInMemory() 268 memory->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in PutElfInMemory() 270 sh_offset += sizeof(shdr); in PutElfInMemory() 274 shdr.sh_offset = 0x500; in PutElfInMemory() 276 memory->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in PutElfInMemory() 279 sh_offset += sizeof(shdr); in PutElfInMemory() 284 shdr.sh_offset = 0x600; in PutElfInMemory() 286 memory->SetMemory(offset + sh_offset, &shdr, sizeof(shdr)); in PutElfInMemory()
|
/aosp12/art/runtime/ |
H A D | elf_file.cc | 213 if (!CheckAndSet(section_header->sh_offset, "symtab", in Setup() 220 if (!CheckAndSet(section_header->sh_offset, "dynsym", in Setup() 251 Begin() + section_header->sh_offset) { in Setup() 312 if (Begin() + section_header->sh_offset == source) { in CheckSectionsLinked() 943 uint8_t* strings = Begin() + string_section.sh_offset; in GetString() 1434 Elf_Off offset = GetSectionHeader(1)->sh_offset; in Strip() 1443 if (old_sh->sh_offset == offset) { in Strip() 1450 Begin() + old_sh->sh_offset, in Strip() 1452 new_sh.sh_offset = offset; in Strip() 1633 *offset = shdr->sh_offset; in GetSectionOffsetAndSize() [all …]
|
/aosp12/bionic/linker/ |
H A D | linker_phdr.cpp | 403 if (pt_dynamic_offset != dynamic_shdr->sh_offset) { in ReadDynamicSection() 408 static_cast<size_t>(dynamic_shdr->sh_offset), in ReadDynamicSection() 417 static_cast<size_t>(dynamic_shdr->sh_offset), in ReadDynamicSection() 456 if (!CheckFileRange(dynamic_shdr->sh_offset, dynamic_shdr->sh_size, alignof(const ElfW(Dyn)))) { in ReadDynamicSection() 461 if (!dynamic_fragment_.Map(fd_, file_offset_, dynamic_shdr->sh_offset, dynamic_shdr->sh_size)) { in ReadDynamicSection() 468 if (!CheckFileRange(strtab_shdr->sh_offset, strtab_shdr->sh_size, alignof(const char))) { in ReadDynamicSection() 474 if (!strtab_fragment_.Map(fd_, file_offset_, strtab_shdr->sh_offset, strtab_shdr->sh_size)) { in ReadDynamicSection()
|
/aosp12/system/chre/platform/shared/ |
H A D | nanoapp_loader.cc | 496 reinterpret_cast<char *>(mBinary + dynamicStringTablePtr->sh_offset); in getDynamicStringTable() 508 table = (mBinary + dynamicSymbolTablePtr->sh_offset); in getDynamicSymbolTable() 587 memcpy(mSectionNamesPtr, mBinary + stringSection.sh_offset, sectionSize); in copyAndVerifyHeaders() 610 memcpy(mSymbolTablePtr, mBinary + symbolTableHeader->sh_offset, in copyAndVerifyHeaders() 631 memcpy(mStringTablePtr, mBinary + stringTableHeader->sh_offset, in copyAndVerifyHeaders()
|
/aosp12/bionic/libc/kernel/uapi/linux/ |
H A D | elf.h | 262 Elf32_Off sh_offset; member 274 Elf64_Off sh_offset; member
|
/aosp12/art/compiler/utils/ |
H A D | assembler_test_base.h | 206 *code = std::vector<uint8_t>(&data[text->sh_offset], &data[text->sh_offset + text->sh_size]); in ReadElf()
|
/aosp12/system/chre/platform/shared/include/chre/platform/shared/ |
H A D | loader_util.h | 190 Elf32_Off sh_offset; member
|
/aosp12/system/bpf/libbpf_android/ |
H A D | Loader.cpp | 146 elfFile.seekg(shTable[id].sh_offset); in readSectionByIdx() 201 elfFile.seekg(shTable[i].sh_offset); in readSectionByName() 249 elfFile.seekg(shTable[i].sh_offset); in readSectionByType()
|
/aosp12/system/extras/simpleperf/ |
H A D | read_elf.cpp | 352 sections[i].file_offset = shdr.sh_offset;
|