| /llvm-project/llvm/lib/ObjCopy/ELF/ |
| H A D | ELFObjcopy.cpp | 47 using SectionPred = std::function<bool(const SectionBase &Sec)>; 49 static bool isDebugSection(const SectionBase &Sec) { 50 return StringRef(Sec.Name).starts_with(".debug") || Sec.Name == ".gdb_index"; 53 static bool isDWOSection(const SectionBase &Sec) { 54 return StringRef(Sec.Name).ends_with(".dwo"); in isDebugSection() argument 57 static bool onlyKeepDWOPred(const Object &Obj, const SectionBase &Sec) { 59 if (&Sec == Obj.SectionNames) in isDWOSection() 63 return !isDWOSection(Sec); in onlyKeepDWOPred() 105 static void setSectionType(SectionBase &Sec, uint64_ in getSectionFlagsPreserveMask() 58 isDWOSection(const SectionBase & Sec) isDWOSection() argument 62 onlyKeepDWOPred(const Object & Obj,const SectionBase & Sec) onlyKeepDWOPred() argument 110 setSectionType(SectionBase & Sec,uint64_t Type) setSectionType() argument 118 setSectionFlagsAndType(SectionBase & Sec,SectionFlag Flags,uint16_t EMachine) setSectionFlagsAndType() argument 195 for (auto &Sec : Obj.sections()) { dumpSectionToFile() local 422 __anonadd7cd7b0602(const SectionBase &Sec) replaceAndRemoveSections() argument 428 __anonadd7cd7b0702(const SectionBase &Sec) replaceAndRemoveSections() argument 433 __anonadd7cd7b0802(const SectionBase &Sec) replaceAndRemoveSections() argument 438 __anonadd7cd7b0902(const SectionBase &Sec) replaceAndRemoveSections() argument 456 __anonadd7cd7b0a02(const SectionBase &Sec) replaceAndRemoveSections() argument 462 __anonadd7cd7b0b02(const SectionBase &Sec) replaceAndRemoveSections() argument 468 __anonadd7cd7b0c02(const SectionBase &Sec) replaceAndRemoveSections() argument 477 __anonadd7cd7b0d02(const SectionBase &Sec) replaceAndRemoveSections() argument 498 __anonadd7cd7b0e02(const SectionBase &Sec) replaceAndRemoveSections() argument 509 __anonadd7cd7b0f02(const SectionBase &Sec) replaceAndRemoveSections() argument 531 __anonadd7cd7b1002(const SectionBase &Sec) replaceAndRemoveSections() argument 547 __anonadd7cd7b1102(const SectionBase &Sec) replaceAndRemoveSections() argument 566 SectionBase *Sec = Obj.findSection(SymInfo.SectionName); addSymbol() local 643 __anonadd7cd7b1202(const SectionBase &Sec) handleArgs() argument 701 for (auto &Sec : Obj.sections()) handleArgs() local 740 for (auto &Sec : Obj.sections()) { handleArgs() local [all...] |
| H A D | ELFObject.cpp | 66 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) { in replaceSectionReferences() 68 reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + Sec.HeaderOffset; 70 Shdr.sh_name = Sec.NameIndex; in writeShdr() 71 Shdr.sh_type = Sec.Type; in writeShdr() 72 Shdr.sh_flags = Sec.Flags; in writeShdr() 73 Shdr.sh_addr = Sec.Addr; in writeShdr() 74 Shdr.sh_offset = Sec.Offset; in writeShdr() 75 Shdr.sh_size = Sec.Size; in writeShdr() 76 Shdr.sh_link = Sec.Link; in writeShdr() 77 Shdr.sh_info = Sec in writeShdr() 69 writeShdr(const SectionBase & Sec) writeShdr() argument 103 visit(SymbolTableSection & Sec) visit() argument 125 visit(RelocationSection & Sec) visit() argument 142 visit(GroupSection & Sec) visit() argument 161 visit(const SectionIndexSection & Sec) visit() argument 167 visit(const SymbolTableSection & Sec) visit() argument 173 visit(const RelocationSection & Sec) visit() argument 179 visit(const GnuDebugLinkSection & Sec) visit() argument 184 visit(const GroupSection & Sec) visit() argument 189 visit(const Section & Sec) visit() argument 346 sectionPhysicalAddr(const SectionBase * Sec) sectionPhysicalAddr() argument 354 writeSection(const SectionBase * Sec,ArrayRef<uint8_t> Data) writeSection() argument 403 visit(const Section & Sec) visit() argument 408 visit(const OwnedDataSection & Sec) visit() argument 413 visit(const StringTableSection & Sec) visit() argument 423 visit(const DynamicRelocationSection & Sec) visit() argument 435 visit(const StringTableSection & Sec) visit() argument 458 visit(const OwnedDataSection & Sec) visit() argument 464 visit(const DecompressedSection & Sec) visit() argument 499 visit(const DecompressedSection & Sec) visit() argument 530 visit(const CompressedSection & Sec) visit() argument 537 visit(const CompressedSection & Sec) visit() argument 560 CompressedSection(const SectionBase & Sec,DebugCompressionType CompressionType,bool Is64Bits) CompressedSection() argument 603 visit(const StringTableSection & Sec) visit() argument 618 visit(const SectionIndexSection & Sec) visit() argument 626 Expected<SymbolTableSection *> Sec = initialize() local 791 Expected<StringTableSection *> Sec = initialize() local 865 visit(const SymbolTableSection & Sec) visit() argument 933 Expected<SymTabType *> Sec = SecTable.getSectionOfType<SymTabType>( initialize() local 946 Expected<SectionBase *> Sec = initialize() local 987 visit(const RelocationSection & Sec) visit() argument 1034 visit(const DynamicRelocationSection & Sec) visit() argument 1140 Expected<SectionBase *> Sec = initialize() local 1182 visit(const GnuDebugLinkSection & Sec) visit() argument 1201 visit(const GroupSection & Sec) visit() argument 1219 sectionWithinSegment(const SectionBase & Sec,const Segment & Seg) sectionWithinSegment() argument 1438 for (const SectionBase &Sec : Obj.sections()) { findEhdrOffset() local 1554 Expected<SectionBase *> Sec = SecTable.getSection( initGroupSection() local 1615 Expected<SectionBase *> Sec = Obj.sections().getSection( initSymbolTable() local 1632 Expected<SectionBase *> Sec = Obj.sections().getSection( initSymbolTable() local 1700 if (T *Sec = dyn_cast<T>(*BaseSec)) getSectionOfType() local 1799 Expected<SectionBase &> Sec = makeSection(Shdr); readSectionHeaders() local 1830 Expected<const Elf_Shdr *> Sec = ElfFile.getSection(0); readSections() local 1840 Expected<StringTableSection *> Sec = readSections() local 2133 SectionBase *Sec = it.first; writeSegmentData() local 2144 for (auto &Sec : Obj.removedSections()) { writeSegmentData() local 2162 __anon64538e5c0602(const SecPtr &Sec) updateSection() argument 2195 __anon64538e5c0702(const SecPtr &Sec) removeSections() argument 2233 __anon64538e5c0802(const SectionBase *Sec) removeSections() argument 2246 __anon64538e5c0902(const SecPtr &Sec) removeSections() argument 2269 for (auto &Sec : Sections) replaceSections() local 2274 __anon64538e5c0b02(const SectionBase &Sec) replaceSections() argument 2282 for (const SecPtr &Sec : Sections) removeSymbols() local 2370 for (auto &Sec : Sections) { layoutSections() local 2384 for (auto *Sec : OutOfSegmentSections) { layoutSections() local 2401 for (auto &Sec : Obj.sections()) { layoutSectionsForOnlyKeepDebug() local 2410 for (auto *Sec : Sections) { layoutSectionsForOnlyKeepDebug() local 2463 for (const SectionBase *Sec : Seg->Sections) { layoutSegmentsForOnlyKeepDebug() local 2569 __anon64538e5c0e02(const SectionBase &Sec) removeUnneededSections() argument 2602 __anon64538e5c0f02(const SectionBase &Sec) finalize() argument 2623 __anon64538e5c1002(const SectionBase &Sec) finalize() argument 2633 for (const SectionBase &Sec : Obj.sections()) finalize() local 2692 for (const SectionBase &Sec : Obj.allocSections()) { write() local 2708 const SectionBase &Sec = *SectionsToWrite[i]; write() local 2840 for (const SectionBase *Sec : Sections) getTotalSize() local 2854 for (const SectionBase *Sec : Sections) write() local 2873 visit(const StringTableSection & Sec) visit() argument 2882 visit(const Section & Sec) visit() argument 2887 visit(const OwnedDataSection & Sec) visit() argument 2892 visit(const DynamicRelocationSection & Sec) visit() argument 2930 visit(const StringTableSection & Sec) visit() argument 3033 for (const SectionBase *Sec : Sections) getTotalSize() local [all...] |
| H A D | ELFObject.h | 77 virtual Error visit(const Section &Sec) = 0; 78 virtual Error visit(const OwnedDataSection &Sec) = 0; 79 virtual Error visit(const StringTableSection &Sec) = 0; 80 virtual Error visit(const SymbolTableSection &Sec) = 0; 81 virtual Error visit(const RelocationSection &Sec) = 0; 82 virtual Error visit(const DynamicRelocationSection &Sec) = 0; 83 virtual Error visit(const GnuDebugLinkSection &Sec) = 0; 84 virtual Error visit(const GroupSection &Sec) = 0; 85 virtual Error visit(const SectionIndexSection &Sec) = 0; 86 virtual Error visit(const CompressedSection &Sec) 596 removeSection(const SectionBase * Sec) removeSection() argument 597 addSection(const SectionBase * Sec) addSection() argument 691 DecompressedSection(const CompressedSection & Sec) DecompressedSection() argument 879 setSection(SectionBase * Sec) setSection() argument 953 addMember(SectionBase * Sec) addMember() argument 1158 sectionIsAlloc(const SectionBase & Sec) sectionIsAlloc() argument 1220 auto Sec = std::make_unique<T>(std::forward<Ts>(Args)...); addSection() local [all...] |
| /llvm-project/llvm/lib/ObjCopy/wasm/ |
| H A D | WasmObjcopy.cpp | 22 using SectionPred = std::function<bool(const Section &Sec)>; 24 static bool isDebugSection(const Section &Sec) { in isDebugSection() argument 25 return Sec.Name.starts_with(".debug") || Sec.Name.starts_with("reloc..debug"); in isDebugSection() 28 static bool isLinkerSection(const Section &Sec) { in isLinkerSection() argument 29 return Sec.Name.starts_with("reloc.") || Sec.Name == "linking"; in isLinkerSection() 32 static bool isNameSection(const Section &Sec) { return Sec.Name == "name"; } in isNameSection() argument 36 static bool isCommentSection(const Section &Sec) { in isCommentSection() argument 42 for (const Section &Sec : Obj.Sections) { dumpSectionToFile() local 65 __anon095451fd0202(const Section &Sec) removeSections() argument 71 __anon095451fd0302(const Section &Sec) removeSections() argument 77 __anon095451fd0402(const Section &Sec) removeSections() argument 84 __anon095451fd0502(const Section &Sec) removeSections() argument 92 __anon095451fd0602(const Section &Sec) removeSections() argument 100 __anon095451fd0702(const Section &Sec) removeSections() argument 125 Section Sec; handleArgs() local [all...] |
| /llvm-project/llvm/include/llvm/Object/ |
| H A D | GOFFObjectFile.h | 72 bool isSectionNoLoad(DataRefImpl Sec) const; 73 bool isSectionReadOnlyData(DataRefImpl Sec) const; 74 bool isSectionZeroInit(DataRefImpl Sec) const; 92 void moveSectionNext(DataRefImpl &Sec) const override; 93 virtual Expected<StringRef> getSectionName(DataRefImpl Sec) const override; 94 uint64_t getSectionAddress(DataRefImpl Sec) const override; 95 uint64_t getSectionSize(DataRefImpl Sec) const override; 97 getSectionContents(DataRefImpl Sec) const override; 98 uint64_t getSectionIndex(DataRefImpl Sec) const override { return Sec.d.a; } in getSectionIndex() argument 99 uint64_t getSectionAlignment(DataRefImpl Sec) const override; [all …]
|
| H A D | ELF.h | 132 const typename ELFT::Shdr &Sec) { in getSecIndexForError() 135 return "[index " + std::to_string(&Sec - &TableOrErr->front()) + "]"; in getSecIndexForError() 146 const typename ELFT::Shdr &Sec) { in describe() 147 unsigned SecNdx = &Sec - &cantFail(Obj.sections()).front(); in describe() 149 Sec.sh_type) + in describe() 171 const typename ELFT::Shdr &Sec) { in checkSectionOffsets() 173 if (Sec.sh_type == ELF::SHT_NOBITS) in checkSectionOffsets() 176 if (Sec.sh_offset < Phdr.p_offset) in checkSectionOffsets() 180 if (Sec.sh_size == 0) in checkSectionOffsets() 181 return (Sec in checkSectionOffsets() 131 getSecIndexForError(const ELFFile<ELFT> & Obj,const typename ELFT::Shdr & Sec) getSecIndexForError() argument 145 describe(const ELFFile<ELFT> & Obj,const typename ELFT::Shdr & Sec) describe() argument 170 checkSectionOffsets(const typename ELFT::Phdr & Phdr,const typename ELFT::Shdr & Sec) checkSectionOffsets() argument 188 checkSectionVMA(const typename ELFT::Phdr & Phdr,const typename ELFT::Shdr & Sec) checkSectionVMA() argument 207 isSectionInSegment(const typename ELFT::Phdr & Phdr,const typename ELFT::Shdr & Sec) isSectionInSegment() argument 347 symbols(const Elf_Shdr * Sec) symbols() argument 353 relas(const Elf_Shdr & Sec) relas() argument 357 rels(const Elf_Shdr & Sec) rels() argument 361 relrs(const Elf_Shdr & Sec) relrs() argument 599 getSymbol(const Elf_Shdr * Sec,uint32_t Index) getSymbol() argument 615 getSectionContentsAsArray(const Elf_Shdr & Sec) getSectionContentsAsArray() argument 671 getSectionContents(const Elf_Shdr & Sec) getSectionContents() argument 1033 getVersionDefinitions(const Elf_Shdr & Sec) getVersionDefinitions() argument 1120 getVersionDependencies(const Elf_Shdr & Sec,WarningHandler WarnHandler) getVersionDependencies() argument 1281 getStringTableForSymtab(const Elf_Shdr & Sec) getStringTableForSymtab() argument 1290 getStringTableForSymtab(const Elf_Shdr & Sec,Elf_Shdr_Range Sections) getStringTableForSymtab() argument 1305 getLinkAsStrtab(const typename ELFT::Shdr & Sec) getLinkAsStrtab() argument [all...] |
| H A D | ELFObjectFile.h | 79 virtual uint32_t getSectionType(DataRefImpl Sec) const = 0; 80 virtual uint64_t getSectionFlags(DataRefImpl Sec) const = 0; 81 virtual uint64_t getSectionOffset(DataRefImpl Sec) const = 0; 127 StringRef getCrelDecodeProblem(SectionRef Sec) const; 274 SectionRef toSectionRef(const Elf_Shdr *Sec) const { in LLVM_ELF_IMPORT_TYPES_ELFT() 275 return SectionRef(toDRI(Sec), this); in LLVM_ELF_IMPORT_TYPES_ELFT() 319 void moveSectionNext(DataRefImpl &Sec) const override; 320 Expected<StringRef> getSectionName(DataRefImpl Sec) const override; 321 uint64_t getSectionAddress(DataRefImpl Sec) const override; 322 uint64_t getSectionIndex(DataRefImpl Sec) cons 378 toELFShdrIter(DataRefImpl Sec) toELFShdrIter() argument 382 toDRI(const Elf_Shdr * Sec) toDRI() argument 471 getSection(DataRefImpl Sec) getSection() argument 584 getSectionFlags(DataRefImpl Sec) getSectionFlags() argument 589 getSectionType(DataRefImpl Sec) getSectionType() argument 594 getSectionOffset(DataRefImpl Sec) getSectionOffset() argument 871 DataRefImpl Sec; getSymbolSection() local 890 moveSectionNext(DataRefImpl & Sec) moveSectionNext() argument 896 getSectionName(DataRefImpl Sec) getSectionName() argument 901 getSectionAddress(DataRefImpl Sec) getSectionAddress() argument 906 getSectionIndex(DataRefImpl Sec) getSectionIndex() argument 917 getSectionSize(DataRefImpl Sec) getSectionSize() argument 923 getSectionContents(DataRefImpl Sec) getSectionContents() argument 935 getSectionAlignment(DataRefImpl Sec) getSectionAlignment() argument 940 isSectionCompressed(DataRefImpl Sec) isSectionCompressed() argument 945 isSectionText(DataRefImpl Sec) isSectionText() argument 950 isSectionData(DataRefImpl Sec) isSectionData() argument 958 isSectionBSS(DataRefImpl Sec) isSectionBSS() argument 994 isSectionVirtual(DataRefImpl Sec) isSectionVirtual() argument 999 isBerkeleyText(DataRefImpl Sec) isBerkeleyText() argument 1006 isBerkeleyData(DataRefImpl Sec) isBerkeleyData() argument 1013 isDebugSection(DataRefImpl Sec) isDebugSection() argument 1027 section_rel_begin(DataRefImpl Sec) section_rel_begin() argument 1058 section_rel_end(DataRefImpl Sec) section_rel_end() argument 1082 getRelocatedSection(DataRefImpl Sec) getRelocatedSection() argument 1505 getCrelDecodeProblem(DataRefImpl Sec) getCrelDecodeProblem() argument [all...] |
| /llvm-project/llvm/lib/ExecutionEngine/JITLink/ |
| H A D | DefineExternalSectionStartAndEndSymbols.h | 28 SectionRangeSymbolDesc(Section &Sec, bool IsStart) in SectionRangeSymbolDesc() 29 : Sec(&Sec), IsStart(IsStart) {} in SectionRangeSymbolDesc() 30 Section *Sec = nullptr; member 51 if (D.Sec) { in operator() 52 auto &SR = getSectionRange(*D.Sec); in operator() 73 SectionRange &getSectionRange(Section &Sec) { in getSectionRange() argument 74 return SectionRanges.try_emplace(&Sec, Sec).first->second; in getSectionRange() 94 /// symbol then SectionRangeSymbolDesc(Sec, tru 119 if (auto *Sec = identifyELFSectionStartAndEndSymbols() local 123 if (auto *Sec = identifyELFSectionStartAndEndSymbols() local 141 if (auto *Sec = G.findSectionByName(SectionName)) identifyMachOSectionStartAndEndSymbols() local 147 if (auto *Sec = G.findSectionByName(SectionName)) identifyMachOSectionStartAndEndSymbols() local [all...] |
| H A D | COFFLinkGraphBuilder.cpp | 47 const object::coff_section *Sec) { in getEndianness() 51 return std::min(Sec->VirtualSize, Sec->SizeOfRawData); 52 return Sec->SizeOfRawData; in getSectionSize() 91 const object::coff_section *Sec, in buildGraph() 108 if (Expected<StringRef> SecNameOrErr = Obj.getSectionName(Sec)) in getCOFFSectionName() 123 Expected<const object::coff_section *> Sec = Obj.getSection(SecIndex); in graphifySections() 124 if (!Sec) in graphifySections() 125 return Sec.takeError(); in graphifySections() 128 if (Expected<StringRef> SecNameOrErr = Obj.getSectionName(*Sec)) in graphifySections() 53 getSectionSize(const object::COFFObjectFile & Obj,const object::coff_section * Sec) getSectionSize() argument 97 getCOFFSectionName(COFFSectionIndex SectionIndex,const object::coff_section * Sec,object::COFFSymbolRef Sym) getCOFFSectionName() argument 129 Expected<const object::coff_section *> Sec = Obj.getSection(SecIndex); graphifySections() local 219 const object::coff_section *Sec = nullptr; graphifySymbols() local [all...] |
| /llvm-project/llvm/lib/ObjCopy/COFF/ |
| H A D | COFFObjcopy.cpp | 31 static bool isDebugSection(const Section &Sec) { in isDebugSection() argument 32 return Sec.Name.starts_with(".debug"); in isDebugSection() 66 Section Sec; in addSection() local 67 Sec.setOwnedContents(Contents); in addSection() 68 Sec.Name = Name; in addSection() 69 Sec.Header.VirtualSize = NeedVA ? Sec.getContents().size() : 0u; in addSection() 70 Sec.Header.VirtualAddress = NeedVA ? getNextRVA(Obj) : 0u; in addSection() 71 Sec.Header.SizeOfRawData = in addSection() 72 NeedVA ? alignTo(Sec in addSection() 166 __anon940dc1e90102(const Section &Sec) handleArgs() argument 188 __anon940dc1e90202(const Section &Sec) handleArgs() argument 279 __anon940dc1e90402(auto &Sec) handleArgs() argument [all...] |
| H A D | COFFObject.cpp | 55 for (const Section &Sec : Sections) { in markSymbols() 56 for (const Relocation &R : Sec.Relocs) { in markSymbols() local 90 auto RemoveAssociated = [&AssociatedSections](const Section &Sec) { in removeSections() 91 return AssociatedSections.contains(Sec.UniqueId); in removeSections() argument 95 llvm::erase_if(Sections, [ToRemove, &RemovedSections](const Section &Sec) { in removeSections() 96 bool Remove = ToRemove(Sec); in removeSections() argument 98 RemovedSections.insert(Sec.UniqueId); in removeSections() 120 for (Section &Sec : Sections) { in truncateSections() 121 if (ToTruncate(Sec)) { in truncateSections() 122 Sec in truncateSections() [all...] |
| /llvm-project/llvm/lib/Object/ |
| H A D | GOFFObjectFile.cpp | 338 DataRefImpl Sec; in getSymbolSection() local 341 return section_iterator(SectionRef(Sec, this)); in getSymbolSection() 359 Sec.d.a = I; in getSymbolSection() 360 return section_iterator(SectionRef(Sec, this)); in getSymbolSection() 376 const uint8_t *GOFFObjectFile::getSectionEdEsdRecord(DataRefImpl &Sec) const { in getSectionEdEsdRecord() 377 SectionEntryImpl EsdIds = SectionList[Sec.d.a]; in getSectionEdEsdRecord() 382 const uint8_t *GOFFObjectFile::getSectionPrEsdRecord(DataRefImpl &Sec) const { in getSectionPrEsdRecord() 383 SectionEntryImpl EsdIds = SectionList[Sec.d.a]; in getSectionPrEsdRecord() 392 DataRefImpl Sec; in getSectionEdEsdRecord() local 393 Sec in getSectionEdEsdRecord() 400 DataRefImpl Sec; getSectionPrEsdRecord() local 555 DataRefImpl Sec; section_begin() local 561 DataRefImpl Sec; section_end() local [all...] |
| H A D | XCOFFObjectFile.cpp | 372 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const { in moveSectionNext() 373 const char *Ptr = reinterpret_cast<const char *>(Sec.p); in moveSectionNext() 374 Sec.p = reinterpret_cast<uintptr_t>(Ptr + getSectionHeaderSize()); in moveSectionNext() 377 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const { in getSectionName() 378 return generateXCOFFFixedNameStringRef(getSectionNameInternal(Sec)); in getSectionName() 381 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const { in getSectionAddress() 385 return toSection64(Sec)->VirtualAddress; in getSectionAddress() 387 return toSection32(Sec)->VirtualAddress; in getSectionAddress() 390 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const { in getSectionIndex() 394 return toSection64(Sec) in getSectionIndex() 809 for (const auto &Sec : Sections) getSectionByType() local 1008 for (const auto &Sec : sections32()) { getNumberOfRelocationEntries() local [all...] |
| /llvm-project/offload/plugins-nextgen/common/src/Utils/ |
| H A D | ELF.cpp | 175 const typename ELFT::Shdr &Sec, StringRef Name) { in getHashTableSymbol() 177 if (Sec.sh_type != ELF::SHT_HASH && Sec.sh_type != ELF::SHT_GNU_HASH) in getHashTableSymbol() 184 auto SymTabOrErr = getSection<ELFT>(*SectionsOrError, Sec.sh_link); in getHashTableSymbol() 201 if (Sec.sh_type == ELF::SHT_GNU_HASH) { in getHashTableSymbol() 204 Sec.sh_offset); in getHashTableSymbol() 205 if (Sec.sh_offset + Sec.sh_size >= Elf.getBufSize()) in getHashTableSymbol() 207 Twine(Sec.sh_offset)); in getHashTableSymbol() 208 if (Sec in getHashTableSymbol() 169 getHashTableSymbol(const ELFObjectFile<ELFT> & ELFObj,const typename ELFT::Shdr & Sec,StringRef Name) getHashTableSymbol() argument 246 getSymTableSymbol(const ELFObjectFile<ELFT> & ELFObj,const typename ELFT::Shdr & Sec,StringRef Name) getSymTableSymbol() argument 276 for (ELFSectionRef Sec : ELFObj.sections()) { getSymbolImpl() local 287 for (ELFSectionRef Sec : ELFObj.sections()) { getSymbolImpl() local [all...] |
| /llvm-project/llvm/lib/ObjCopy/MachO/ |
| H A D | MachOReader.cpp | 31 static Section constructSectionCommon(const SectionType &Sec, uint32_t Index) { 32 StringRef SegName(Sec.segname, strnlen(Sec.segname, sizeof(Sec.segname))); in constructSectionCommon() argument 33 StringRef SectName(Sec.sectname, strnlen(Sec.sectname, sizeof(Sec.sectname))); in constructSectionCommon() 36 S.Addr = Sec.addr; in constructSectionCommon() 37 S.Size = Sec.size; in constructSectionCommon() 38 S.OriginalOffset = Sec in constructSectionCommon() 50 constructSection(const MachO::section & Sec,uint32_t Index) constructSection() argument 54 constructSection(const MachO::section_64 & Sec,uint32_t Index) constructSection() argument 70 SectionType Sec; extractSections() local 352 for (const std::unique_ptr<Section> &Sec : LC.Sections) readSwiftVersion() local [all...] |
| H A D | MachOObjcopy.cpp | 32 using SectionPred = std::function<bool(const std::unique_ptr<Section> &Sec)>; 61 RemovePred = [&Config, RemovePred](const std::unique_ptr<Section> &Sec) { in removeSections() argument 62 return Config.ToRemove.matches(Sec->CanonicalName); in removeSections() 68 RemovePred = [RemovePred](const std::unique_ptr<Section> &Sec) { in removeSections() argument 69 if (Sec->Segname == "__DWARF") in removeSections() 72 return RemovePred(Sec); in removeSections() 78 RemovePred = [&Config](const std::unique_ptr<Section> &Sec) { in removeSections() argument 79 return !Config.OnlySection.matches(Sec->CanonicalName); in removeSections() 311 for (const std::unique_ptr<Section> &Sec : LC.Sections) { in addSection() 312 if (Sec in addSection() 292 for (const std::unique_ptr<Section> &Sec : LC.Sections) { dumpSectionToFile() local 314 Section Sec(TargetSegName, Pair.second); addSection() local 353 __anon16f7cf9d0902(const std::unique_ptr<Section> &Sec) findSection() argument 370 Section &Sec = *SecToUpdateOrErr; updateSection() local [all...] |
| H A D | MachOWriter.cpp | 167 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() 168 writeSectionInLoadCommand<MachO::section>(*Sec, Begin); in writeLoadCommands() local 177 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() 178 writeSectionInLoadCommand<MachO::section_64>(*Sec, Begin); in writeLoadCommands() local 214 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { 216 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name"); in writeSectionInLoadCommand() 217 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) && in writeSectionInLoadCommand() 220 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size()); in writeSectionInLoadCommand() 221 memcpy(Temp.sectname, Sec in writeSectionInLoadCommand() 215 writeSectionInLoadCommand(const Section & Sec,uint8_t * & Out) writeSectionInLoadCommand() argument 241 for (const std::unique_ptr<Section> &Sec : LC.Sections) { writeSections() local [all...] |
| /llvm-project/llvm/lib/ExecutionEngine/Orc/Debugging/ |
| H A D | DebugInfoSupport.cpp | 33 static void preserveDWARFSection(LinkGraph &G, Section &Sec) { in preserveDWARFSection() argument 35 for (auto Sym : Sec.symbols()) { in preserveDWARFSection() 41 for (auto Block : Sec.blocks()) { in preserveDWARFSection() 50 static SmallVector<char, 0> getSectionData(Section &Sec) { in getSectionData() argument 52 SmallVector<Block *, 8> SecBlocks(Sec.blocks().begin(), Sec.blocks().end()); in getSectionData() 84 for (auto &Sec : G.sections()) { in preserveDebugSections() local 85 if (DWARFSectionNames.count(Sec.getName())) { in preserveDebugSections() 86 LLVM_DEBUG(dbgs() << "Preserving DWARF section " << Sec.getName() in preserveDebugSections() 88 preserveDWARFSection(G, Sec); in preserveDebugSections() 103 for (auto &Sec : G.sections()) { in createDWARFContext() local [all …]
|
| /llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ |
| H A D | MachOBuilder.h | 290 for (auto &Sec : Sections) 291 Offset = writeMachOStruct(Buf, Offset, Sec->rawStruct(), SwapStruct); 366 for (auto &Sec : Seg.Sections) { 367 Offset = alignTo(Offset, 1ULL << Sec->align); 368 if (Sec->Content.Size) 369 Sec->offset = Offset; 370 Sec->size = Sec->Content.Size; 371 Sec->addr = SegVMAddr + Sec [all...] |
| /llvm-project/llvm/lib/ObjCopy/XCOFF/ |
| H A D | XCOFFWriter.cpp | 28 for (const Section &Sec : Obj.Sections) { in finalizeSections() local 30 FileSize += Sec.Contents.size(); in finalizeSections() 33 Sec.SectionHeader.NumberOfRelocations * sizeof(XCOFFRelocation32); in finalizeSections() 67 for (const Section &Sec : Obj.Sections) { in writeHeaders() local 68 memcpy(Ptr, &Sec.SectionHeader, sizeof(XCOFFSectionHeader32)); in writeHeaders() 75 for (const Section &Sec : Obj.Sections) { in writeSections() local 77 Sec.SectionHeader.FileOffsetToRawData; in writeSections() 78 Ptr = std::copy(Sec.Contents.begin(), Sec.Contents.end(), Ptr); in writeSections() 82 for (const Section &Sec : Obj.Sections) { in writeSections() local 84 Sec.SectionHeader.FileOffsetToRelocationInfo; in writeSections() [all …]
|
| /llvm-project/llvm/tools/llvm-jitlink/ |
| H A D | llvm-jitlink-macho.cpp | 86 for (auto &Sec : G.sections()) { in registerMachOGraphInfo() 88 dbgs() << " Section \"" << Sec.getName() << "\": " in registerMachOGraphInfo() 89 << (Sec.symbols().empty() ? "empty. skipping." : "processing...") in registerMachOGraphInfo() 94 if (Sec.symbols().empty()) in registerMachOGraphInfo() 97 if (FileInfo.SectionInfos.count(Sec.getName())) in registerMachOGraphInfo() 99 Sec.getName() + "\" in \"" + FileName + in registerMachOGraphInfo() 103 bool isGOTSection = isMachOGOTSection(Sec); in registerMachOGraphInfo() 104 bool isStubsSection = isMachOStubsSection(Sec); in registerMachOGraphInfo() 109 auto *FirstSym = *Sec.symbols().begin(); in registerMachOGraphInfo() 111 for (auto *Sym : Sec in registerMachOGraphInfo() 84 for (auto &Sec : G.sections()) { registerMachOGraphInfo() local [all...] |
| H A D | llvm-jitlink-coff.cpp | 82 for (auto &Sec : G.sections()) { in registerCOFFGraphInfo() 84 dbgs() << " Section \"" << Sec.getName() << "\": " in registerCOFFGraphInfo() 85 << (Sec.symbols().empty() ? "empty. skipping." : "processing...") in registerCOFFGraphInfo() 90 if (Sec.symbols().empty()) in registerCOFFGraphInfo() 93 if (FileInfo.SectionInfos.count(Sec.getName())) in registerCOFFGraphInfo() 95 Sec.getName() + "\" in \"" + FileName + in registerCOFFGraphInfo() 99 bool isGOTSection = isCOFFGOTSection(Sec); in registerCOFFGraphInfo() 100 bool isStubsSection = isCOFFStubsSection(Sec); in registerCOFFGraphInfo() 105 auto *FirstSym = *Sec.symbols().begin(); in registerCOFFGraphInfo() 107 for (auto *Sym : Sec in registerCOFFGraphInfo() 80 for (auto &Sec : G.sections()) { registerCOFFGraphInfo() local [all...] |
| H A D | llvm-jitlink-elf.cpp | 118 for (auto &Sec : G.sections()) { in registerELFGraphInfo() 120 dbgs() << " Section \"" << Sec.getName() << "\": " in registerELFGraphInfo() 121 << (Sec.symbols().empty() ? "empty. skipping." : "processing...") in registerELFGraphInfo() 126 if (Sec.symbols().empty()) in registerELFGraphInfo() 129 if (FileInfo.SectionInfos.count(Sec.getName())) in registerELFGraphInfo() 131 Sec.getName() + "\" in \"" + FileName + in registerELFGraphInfo() 136 if (isELFGOTSection(Sec)) { in registerELFGraphInfo() 138 } else if (isELFStubsSection(Sec)) { in registerELFGraphInfo() 140 } else if (isELFAArch32StubsSection(Sec)) { in registerELFGraphInfo() 149 auto *FirstSym = *Sec in registerELFGraphInfo() 116 for (auto &Sec : G.sections()) { registerELFGraphInfo() local [all...] |
| /llvm-project/llvm/lib/MC/ |
| H A D | WinCOFFObjectWriter.cpp | 173 void defineSection(const MCAssembler &Asm, MCSectionCOFF const &Sec); 190 void writeSection(MCAssembler &Asm, const COFFSection &Sec); 212 static bool isDwoSection(const MCSection &Sec) { in WinCOFFObjectWriter() 213 return Sec.getName().ends_with(".dwo"); in WinCOFFObjectWriter() 258 static uint32_t getAlignment(const MCSectionCOFF &Sec) { in WinCOFFWriter() 259 switch (Sec.getAlign().value()) { in WinCOFFWriter() 374 COFFSection *Sec = nullptr; in getSymbolValue() 378 Sec = SectionMap[MCSec]; in getLinkedSymbol() 394 if (!Sec) in defineSymbol() 397 WeakDefault->Section = Sec; in defineSymbol() local 235 isDwoSection(const MCSection & Sec) isDwoSection() argument 281 getAlignment(const MCSectionCOFF & Sec) getAlignment() argument 618 writeSection(MCAssembler & Asm,const COFFSection & Sec) writeSection() argument 766 COFFSection *Sec = SectionMap[&Section]; assignFileOffsets() local 873 COFFSection *Sec = SectionMap[MCSec]; recordRelocation() local 1089 auto *Sec = Asm.getContext().getCOFFSection( writeObject() local 1111 auto *Sec = Asm.getContext().getCOFFSection( writeObject() local [all...] |
| /llvm-project/llvm/lib/ObjectYAML/ |
| H A D | MachOEmitter.cpp | 107 SectionType constructSection(const MachOYAML::Section &Sec) { 109 memcpy(reinterpret_cast<void *>(&TempSec.sectname[0]), &Sec.sectname[0], 16); in constructSection() argument 110 memcpy(reinterpret_cast<void *>(&TempSec.segname[0]), &Sec.segname[0], 16); in constructSection() 111 TempSec.addr = Sec.addr; in constructSection() 112 TempSec.size = Sec.size; in constructSection() 113 TempSec.offset = Sec.offset; in constructSection() 114 TempSec.align = Sec.align; in constructSection() 115 TempSec.reloff = Sec.reloff; in constructSection() 116 TempSec.nreloc = Sec.nreloc; in constructSection() 117 TempSec.flags = Sec in constructSection() 136 for (const auto &Sec : LC.Sections) { writeLoadCommandData() local 151 for (const auto &Sec : LC.Sections) { writeLoadCommandData() local 313 for (auto &Sec : LC.Sections) { writeSectionData() local 409 for (const MachOYAML::Section &Sec : LC.Sections) { writeRelocations() local [all...] |