reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
40 uint8_t *B = Buf.getBufferStart() + Obj.ProgramHdrSegment.Offset + 1697 Ehdr.e_ident[EI_OSABI] = Obj.OSABI; 1698 Ehdr.e_ident[EI_ABIVERSION] = Obj.ABIVersion; 1700 Ehdr.e_type = Obj.Type; 1701 Ehdr.e_machine = Obj.Machine; 1702 Ehdr.e_version = Obj.Version; 1703 Ehdr.e_entry = Obj.Entry; 1706 Ehdr.e_phnum = llvm::size(Obj.segments()); 1707 Ehdr.e_phoff = (Ehdr.e_phnum != 0) ? Obj.ProgramHdrSegment.Offset : 0; 1709 Ehdr.e_flags = Obj.Flags; 1711 if (WriteSectionHeaders && Obj.sections().size() != 0) { 1713 Ehdr.e_shoff = Obj.SHOff; 1720 auto Shnum = Obj.sections().size() + 1; 1731 if (Obj.SectionNames->Index >= SHN_LORESERVE) 1734 Ehdr.e_shstrndx = Obj.SectionNames->Index; 1744 for (auto &Seg : Obj.segments()) 1752 *reinterpret_cast<Elf_Shdr *>(Buf.getBufferStart() + Obj.SHOff); 1759 uint64_t Shnum = Obj.sections().size() + 1; 1765 if (Obj.SectionNames != nullptr && Obj.SectionNames->Index >= SHN_LORESERVE) 1765 if (Obj.SectionNames != nullptr && Obj.SectionNames->Index >= SHN_LORESERVE) 1766 Shdr.sh_link = Obj.SectionNames->Index; 1773 for (SectionBase &Sec : Obj.sections()) 1778 for (SectionBase &Sec : Obj.sections()) 1787 for (Segment &Seg : Obj.segments()) { 1795 for (auto &Sec : Obj.removedSections()) { 1949 Segment &ElfHdr = Obj.ElfHdrSegment; 1963 for (Segment &Segment : Obj.segments()) 1965 OrderedSegments.push_back(&Obj.ElfHdrSegment); 1966 OrderedSegments.push_back(&Obj.ProgramHdrSegment); 1973 Offset = layoutSections(Obj.sections(), Offset); 1978 Obj.SHOff = Offset; 1985 return Obj.SHOff; 1986 size_t ShdrCount = Obj.sections().size() + 1; // Includes null shdr. 1987 return Obj.SHOff + ShdrCount * sizeof(Elf_Shdr); 2025 if (Obj.SectionNames == nullptr && WriteSectionHeaders) 2030 if (Error E = removeUnneededSections(Obj)) 2032 Obj.sortSections(); 2038 if (Obj.sections().size() >= SHN_LORESERVE) { 2039 SectionTableRef Sections = Obj.sections(); 2050 if (Obj.SymbolTable != nullptr && Obj.SectionIndexTable == nullptr) { 2050 if (Obj.SymbolTable != nullptr && Obj.SectionIndexTable == nullptr) { 2053 auto &Shndx = Obj.addSection<SectionIndexSection>(); 2054 Obj.SymbolTable->setShndxTable(&Shndx); 2055 Shndx.setSymTab(Obj.SymbolTable); 2060 if (Obj.SectionIndexTable != nullptr) { 2062 if (Error E = Obj.removeSections(false /*AllowBrokenLinks*/, 2064 return &Sec == Obj.SectionIndexTable; 2072 if (Obj.SectionNames != nullptr) 2073 for (const SectionBase &Sec : Obj.sections()) 2074 Obj.SectionNames->addString(Sec.Name); 2083 for (SectionBase &Sec : Obj.sections()) { 2091 if (Obj.SymbolTable != nullptr) 2092 Obj.SymbolTable->prepareForLayout(); 2096 for (SectionBase &Sec : Obj.sections()) 2104 if (Obj.SymbolTable != nullptr) 2105 Obj.SymbolTable->fillShndxTable(); 2109 uint64_t Offset = Obj.SHOff + sizeof(Elf_Shdr); 2110 for (SectionBase &Sec : Obj.sections()) { 2114 Sec.NameIndex = Obj.SectionNames->findIndex(Sec.Name); 2125 for (const SectionBase &Sec : Obj.allocSections()) 2136 for (const SectionBase &Sec : Obj.allocSections()) 2181 layoutSections(Obj.allocSections(), Offset); 2188 for (const SectionBase &Sec : Obj.allocSections()) 2208 if (Obj.Entry == 0) 2211 if (Obj.Entry <= 0xFFFFFU) { 2212 Data[0] = ((Obj.Entry & 0xF0000U) >> 12) & 0xFF; 2213 support::endian::write(&Data[2], static_cast<uint16_t>(Obj.Entry), 2217 support::endian::write(Data, static_cast<uint32_t>(Obj.Entry), 2266 if (addressOverflows32bit(Obj.Entry)) 2269 Obj.Entry); 2274 for (const SectionBase &Sec : Obj.sections()) 2280 for (const SectionBase &Sec : Obj.sections()) 2294 (Obj.Entry ? IHexRecord::getLineLength(4) : 0) +