/external/llvm-project/lld/lib/ReaderWriter/MachO/ |
D | LayoutPass.h | 22 class DefinedAtom; variable 35 SortKey(OwningAtomPtr<DefinedAtom> &&atom, in SortKey() 36 const DefinedAtom *root, uint64_t override) in SortKey() 38 OwningAtomPtr<DefinedAtom> _atom; 39 const DefinedAtom *_root; 62 typedef std::function<bool (const DefinedAtom *left, const DefinedAtom *right, 75 void buildFollowOnTable(const File::AtomRange<DefinedAtom> &range); 78 void buildOrdinalOverrideMap(const File::AtomRange<DefinedAtom> &range); 83 typedef llvm::DenseMap<const DefinedAtom *, const DefinedAtom *> AtomToAtomT; 84 typedef llvm::DenseMap<const DefinedAtom *, uint64_t> AtomToOrdinalT; [all …]
|
D | LayoutPass.cpp | 53 typedef llvm::DenseMap<const DefinedAtom *, const DefinedAtom *> AtomToAtomT; 56 const DefinedAtom *definedAtom = dyn_cast<DefinedAtom>(atom); in atomToDebugString() 74 const DefinedAtom *atom) { in showCycleDetectedError() 75 const DefinedAtom *start = atom; in showCycleDetectedError() 98 const DefinedAtom *root) { in checkNoCycleInFollowonChain() 99 const DefinedAtom *tortoise = root; in checkNoCycleInFollowonChain() 100 const DefinedAtom *hare = followOnNexts[root]; in checkNoCycleInFollowonChain() 112 const DefinedAtom *atom) { in checkReachabilityFromRoot() 121 const DefinedAtom *ap = i->second; in checkReachabilityFromRoot() 123 const DefinedAtom *next = followOnRoots[ap]; in checkReachabilityFromRoot() [all …]
|
D | ShimPass.cpp | 51 for (const DefinedAtom *atom : mergedFile.defined()) { in perform() 58 if (const lld::DefinedAtom *daTarget = dyn_cast<DefinedAtom>(target)) { in perform() 71 std::vector<const DefinedAtom *> shims; in perform() 77 [](const DefinedAtom *l, const DefinedAtom *r) { in perform() 82 for (const DefinedAtom *shim : shims) in perform() 90 void updateBranchToUseShim(bool thumbToArm, const DefinedAtom& target, in updateBranchToUseShim() 93 const DefinedAtom *shim = this->getShim(thumbToArm, target); in updateBranchToUseShim() 99 const DefinedAtom* getShim(bool thumbToArm, const DefinedAtom& target) { in getShim() 107 const DefinedAtom *shim = _archHandler.createShim(_file, thumbToArm, in getShim() 118 llvm::DenseMap<const Atom*, const DefinedAtom*> _targetToShim;
|
D | ExecutableAtoms.h | 72 DefinedAtom::Scope symbolScope = DefinedAtom::scopeLinkageUnit; in MachHeaderAliasFile() 80 symbolScope = DefinedAtom::scopeGlobal; in MachHeaderAliasFile() 112 DefinedAtom::typeMachHeader, DefinedAtom::mergeNo, false, in MachHeaderAliasFile() 114 ArrayRef<uint8_t>(), DefinedAtom::Alignment(4096))); in MachHeaderAliasFile() 118 *this, dsoHandleName, DefinedAtom::scopeLinkageUnit, in MachHeaderAliasFile() 119 DefinedAtom::typeDSOHandle, DefinedAtom::mergeNo, false, in MachHeaderAliasFile() 121 ArrayRef<uint8_t>(), DefinedAtom::Alignment(1))); in MachHeaderAliasFile() 124 const AtomRange<DefinedAtom> defined() const override { in defined() 148 mutable AtomVector<DefinedAtom> _definedAtoms;
|
D | MachONormalizedFileFromAtoms.cpp | 48 const DefinedAtom *atom; 115 void processAtomAttributes(const DefinedAtom *atom); 116 void assignAtomToSection(const DefinedAtom *atom); 149 typedef std::map<DefinedAtom::ContentType, SectionInfo*> TypeToSection; 155 SectionInfo *sectionForAtom(const DefinedAtom*); 156 SectionInfo *getRelocatableSection(DefinedAtom::ContentType type); 157 SectionInfo *getFinalSection(DefinedAtom::ContentType type); 158 void appendAtom(SectionInfo *sect, const DefinedAtom *atom); 163 uint16_t descBits(const DefinedAtom* atom); 167 const Atom *targetOfLazyPointer(const DefinedAtom *lpAtom); [all …]
|
D | GOTPass.cpp | 59 return DefinedAtom::typeGOT; in contentType() 71 return DefinedAtom::permRW_; in permissions() 102 for (const DefinedAtom *atom : mergedFile.defined()) { in perform() 116 const DefinedAtom *gotEntry = makeGOTEntry(target); in perform() 145 const DefinedAtom *defTarget = dyn_cast<DefinedAtom>(target); in shouldReplaceTargetWithGOTAtom() 147 defTarget->interposable() != DefinedAtom::interposeNo) { in shouldReplaceTargetWithGOTAtom() 148 assert(defTarget->scope() != DefinedAtom::scopeTranslationUnit); in shouldReplaceTargetWithGOTAtom() 156 const DefinedAtom *makeGOTEntry(const Atom *target) { in makeGOTEntry()
|
D | ArchHandler_x86.cpp | 89 const DefinedAtom *inAtom, 100 const DefinedAtom *inAtom, 109 void generateAtomContent(const DefinedAtom &atom, bool relocatable, 115 void appendSectionRelocations(const DefinedAtom &atom, 220 DefinedAtom::typeNonLazyPointer, 252 const DefinedAtom *inAtom, in getReferenceInfo() 260 DefinedAtom::ContentPermissions perms; in getReferenceInfo() 315 ((perms & DefinedAtom::permR_X) == DefinedAtom::permR_X) ? abs32 in getReferenceInfo() 326 ((perms & DefinedAtom::permR_X) == DefinedAtom::permR_X) ? abs32 in getReferenceInfo() 335 ((perms & DefinedAtom::permR_X) == DefinedAtom::permR_X) ? abs32 in getReferenceInfo() [all …]
|
D | ArchHandler.h | 104 virtual const Atom *fdeTargetFunction(const DefinedAtom *fde); 138 const DefinedAtom *inAtom, 154 const DefinedAtom *inAtom, 176 virtual bool needsLocalSymbolInRelocatableFile(const DefinedAtom *atom) { in needsLocalSymbolInRelocatableFile() 181 virtual void generateAtomContent(const DefinedAtom &atom, bool relocatable, 188 virtual void appendSectionRelocations(const DefinedAtom &atom, 224 virtual bool isThumbFunction(const DefinedAtom &atom) { return false; } in isThumbFunction() 227 virtual const DefinedAtom *createShim(MachOFile &file, bool thumbToArm, in createShim() 228 const DefinedAtom &) { in createShim() argument 233 static bool isDwarfCIE(bool isBig, const DefinedAtom *atom); [all …]
|
D | CompactUnwindPass.cpp | 50 CompactUnwindEntry(const DefinedAtom *function) in CompactUnwindEntry() 93 return DefinedAtom::typeProcessedUnwindInfo; in contentType() 101 return DefinedAtom::permR__; in permissions() 353 mergedFile.removeDefinedAtomsIf([](const DefinedAtom *atom) { in perform() 354 return atom->contentType() == DefinedAtom::typeCompactUnwindInfo; in perform() 366 for (const DefinedAtom *atom : mergedFile.defined()) { in collectCompactUnwindEntries() 367 if (atom->contentType() != DefinedAtom::typeCompactUnwindInfo) in collectCompactUnwindEntries() 396 CompactUnwindEntry extractCompactUnwindEntry(const DefinedAtom *atom) { in extractCompactUnwindEntry() 432 for (const DefinedAtom *ehFrameAtom : mergedFile.defined()) { in collectDwarfFrameEntries() 433 if (ehFrameAtom->contentType() != DefinedAtom::typeCFI) in collectDwarfFrameEntries() [all …]
|
D | StubsPass.cpp | 42 return DefinedAtom::typeLazyPointer; in contentType() 54 return DefinedAtom::permRW_; in permissions() 90 return DefinedAtom::permRW_; in permissions() 115 return DefinedAtom::typeStub; in contentType() 127 return DefinedAtom::permR_X; in permissions() 149 return DefinedAtom::typeStubHelper; in contentType() 161 return DefinedAtom::permR_X; in permissions() 184 return DefinedAtom::typeStubHelper; in contentType() 196 return DefinedAtom::permR_X; in permissions() 223 for (const DefinedAtom *atom : mergedFile.defined()) { in perform() [all …]
|
D | Atoms.h | 60 if (_contentType == DefinedAtom::typeInitializerPtr) in deadStrip() 62 if (_contentType == DefinedAtom::typeTerminatorPtr) in deadStrip() 79 const DefinedAtom::Alignment _align; 101 return DefinedAtom::sectionCustomRequired; in sectionChoice() 114 uint64_t size, DefinedAtom::Alignment align) in MachOTentativeDefAtom() 122 Merge merge() const override { return DefinedAtom::mergeAsTentative; } in merge() 124 ContentType contentType() const override { return DefinedAtom::typeZeroFill; } in contentType() 138 const DefinedAtom::Alignment _align;
|
D | ArchHandler_arm.cpp | 83 const DefinedAtom *inAtom, 94 const DefinedAtom *inAtom, 103 void generateAtomContent(const DefinedAtom &atom, bool relocatable, 109 void appendSectionRelocations(const DefinedAtom &atom, 141 bool isThumbFunction(const DefinedAtom &atom) override; 142 const DefinedAtom *createShim(MachOFile &file, bool thumbToArm, 143 const DefinedAtom &) override; 197 StringRef stubName(const DefinedAtom &); 271 DefinedAtom::typeGOT, 339 StringRef ArchHandler_arm::stubName(const DefinedAtom &stubAtom) { in stubName() [all …]
|
D | MachONormalizedFileToAtoms.cpp | 52 {seg, sect, type, DefinedAtom::atomType } 58 DefinedAtom::ContentType atomType; 105 DefinedAtom::ContentType atomTypeFromSection(const Section §ion, in atomTypeFromSection() 110 p->atomType != DefinedAtom::typeUnknown; ++p) { in atomTypeFromSection() 122 return DefinedAtom::typeCode; in atomTypeFromSection() 124 return DefinedAtom::typeUnknown; in atomTypeFromSection() 139 void sectionParseInfo(DefinedAtom::ContentType atomType, in sectionParseInfo() 141 DefinedAtom::Scope &scope, in sectionParseInfo() 142 DefinedAtom::Merge &merge, in sectionParseInfo() 145 DefinedAtom::ContentType atomType; in sectionParseInfo() [all …]
|
D | TLVPass.cpp | 35 return DefinedAtom::typeTLVInitializerPtr; in contentType() 47 return DefinedAtom::permRW_; in permissions() 77 for (const DefinedAtom *atom : mergedFile.defined()) { in perform() 91 const DefinedAtom *tlvpEntry = makeTLVPEntry(target); in perform() 112 const DefinedAtom *makeTLVPEntry(const Atom *target) { in makeTLVPEntry()
|
D | File.h | 42 DefinedAtom::ContentType type, DefinedAtom::Merge merge, in addDefinedAtom() 54 DefinedAtom::Alignment align( in addDefinedAtom() 64 DefinedAtom::ContentType type, DefinedAtom::Merge merge, in addDefinedAtomInCustomSection() 77 DefinedAtom::Alignment align( in addDefinedAtomInCustomSection() 96 DefinedAtom::Alignment align( in addZeroFillDefinedAtom() 100 DefinedAtom::ContentType type = DefinedAtom::typeUnknown; in addZeroFillDefinedAtom() 103 type = DefinedAtom::typeZeroFill; in addZeroFillDefinedAtom() 106 type = DefinedAtom::typeTLVInitialZeroFill; in addZeroFillDefinedAtom() 129 DefinedAtom::Alignment align, bool copyRefs) { in addTentativeDefAtom()
|
D | ObjCPass.cpp | 64 return DefinedAtom::typeObjCImageInfo; in contentType() 76 return DefinedAtom::permR__; in permissions() 113 const DefinedAtom* getImageInfo() { in getImageInfo()
|
D | ArchHandler_arm64.cpp | 138 const DefinedAtom *inAtom, 149 const DefinedAtom *inAtom, 158 bool needsLocalSymbolInRelocatableFile(const DefinedAtom *atom) override { in needsLocalSymbolInRelocatableFile() 159 return (atom->contentType() == DefinedAtom::typeCString); in needsLocalSymbolInRelocatableFile() 162 void generateAtomContent(const DefinedAtom &atom, bool relocatable, 168 void appendSectionRelocations(const DefinedAtom &atom, 297 DefinedAtom::typeGOT, 378 const Relocation &reloc, const DefinedAtom *inAtom, uint32_t offsetInAtom, in getReferenceInfo() 458 if (inAtom->contentType() == DefinedAtom::typeCFI) in getReferenceInfo() 474 const DefinedAtom *inAtom, uint32_t offsetInAtom, uint64_t fixupAddress, in getPairReferenceInfo() [all …]
|
D | ArchHandler_x86_64.cpp | 146 const DefinedAtom *inAtom, 157 const DefinedAtom *inAtom, 166 bool needsLocalSymbolInRelocatableFile(const DefinedAtom *atom) override { in needsLocalSymbolInRelocatableFile() 167 return (atom->contentType() == DefinedAtom::typeCString); in needsLocalSymbolInRelocatableFile() 170 void generateAtomContent(const DefinedAtom &atom, bool relocatable, 176 void appendSectionRelocations(const DefinedAtom &atom, 323 DefinedAtom::typeNonLazyPointer, 397 const DefinedAtom *inAtom, in getReferenceInfo() 457 if (inAtom->contentType() == DefinedAtom::typeThunkTLV && in getReferenceInfo() 475 const DefinedAtom *inAtom, in getPairReferenceInfo() [all …]
|
/external/llvm-project/lld/lib/ReaderWriter/YAML/ |
D | ReaderWriterYAML.cpp | 78 for (const lld::DefinedAtom *atom : file.defined()) { in RefNameBuilder() 302 template <> struct ScalarEnumerationTraits<lld::DefinedAtom::SectionChoice> { 303 static void enumeration(IO &io, lld::DefinedAtom::SectionChoice &value) { in enumeration() 304 io.enumCase(value, "content", lld::DefinedAtom::sectionBasedOnContent); in enumeration() 305 io.enumCase(value, "custom", lld::DefinedAtom::sectionCustomPreferred); in enumeration() 307 lld::DefinedAtom::sectionCustomRequired); in enumeration() 311 template <> struct ScalarEnumerationTraits<lld::DefinedAtom::Interposable> { 312 static void enumeration(IO &io, lld::DefinedAtom::Interposable &value) { in enumeration() 313 io.enumCase(value, "no", DefinedAtom::interposeNo); in enumeration() 314 io.enumCase(value, "yes", DefinedAtom::interposeYes); in enumeration() [all …]
|
/external/llvm-project/lld/include/lld/Core/ |
D | SymbolTable.h | 23 class DefinedAtom; variable 37 bool add(const DefinedAtom &); 77 static const DefinedAtom * getEmptyKey() { return nullptr; } in getEmptyKey() 78 static const DefinedAtom * getTombstoneKey() { return (DefinedAtom*)(-1); } in getTombstoneKey() 79 static unsigned getHashValue(const DefinedAtom * const Val); 80 static bool isEqual(const DefinedAtom * const LHS, 81 const DefinedAtom * const RHS); 83 typedef llvm::DenseSet<const DefinedAtom*, AtomMappingInfo> AtomContentSet; 86 bool addByContent(const DefinedAtom &);
|
D | Simple.h | 50 void addAtom(DefinedAtom &a) { in addAtom() 51 _defined.push_back(OwningAtomPtr<DefinedAtom>(&a)); in addAtom() 64 if (auto *p = dyn_cast<DefinedAtom>(&atom)) { in addAtom() 65 addAtom(const_cast<DefinedAtom &>(*p)); in addAtom() 77 void removeDefinedAtomsIf(std::function<bool(const DefinedAtom *)> pred) { in removeDefinedAtomsIf() 80 [&pred](OwningAtomPtr<DefinedAtom> &p) { in removeDefinedAtomsIf() 86 const AtomRange<DefinedAtom> defined() const override { return _defined; } in defined() 108 AtomVector<DefinedAtom> _defined; 143 class SimpleDefinedAtom : public DefinedAtom { 158 Scope scope() const override { return DefinedAtom::scopeLinkageUnit; } in scope() [all …]
|
D | DefinedAtom.h | 84 class DefinedAtom : public Atom { 291 reference_iterator(const DefinedAtom &a, const void *it) in reference_iterator() 315 const DefinedAtom &_atom; 343 return !(atomContentType == DefinedAtom::typeZeroFill || in occupiesDiskSpace() 344 atomContentType == DefinedAtom::typeZeroFillFast || in occupiesDiskSpace() 345 atomContentType == DefinedAtom::typeTLVInitialZeroFill); in occupiesDiskSpace() 359 DefinedAtom() : Atom(definitionRegular) { } in DefinedAtom() function 361 ~DefinedAtom() override = default;
|
/external/llvm-project/lld/lib/Core/ |
D | SymbolTable.cpp | 36 bool SymbolTable::add(const DefinedAtom &atom) { in add() 38 atom.scope() != DefinedAtom::scopeTranslationUnit) { in add() 40 assert(atom.merge() != DefinedAtom::mergeByContent); in add() 44 if (atom.merge() == DefinedAtom::mergeByContent) { in add() 48 if (atom.permissions() == DefinedAtom::permR__) in add() 107 static MergeResolution mergeSelect(DefinedAtom::Merge first, in mergeSelect() 108 DefinedAtom::Merge second) { in mergeSelect() 109 assert(first != DefinedAtom::mergeByContent); in mergeSelect() 110 assert(second != DefinedAtom::mergeByContent); in mergeSelect() 138 const auto *existingDef = cast<DefinedAtom>(existing); in addByName() [all …]
|
D | DefinedAtom.cpp | 15 DefinedAtom::ContentPermissions DefinedAtom::permissions() const { in permissions() 21 DefinedAtom::ContentPermissions DefinedAtom::permissions(ContentType type) { in permissions()
|
D | Resolver.cpp | 124 void Resolver::doDefinedAtom(OwningAtomPtr<DefinedAtom> atom) { in doDefinedAtom() 140 atom.get()->deadStrip() == DefinedAtom::deadStripNever) { in doDefinedAtom() 299 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get())) { in updateReferences() 326 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom)) { in markLive() 356 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get())) in deadStripOptimize() 367 if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get())) in deadStripOptimize() 368 if (defAtom->scope() == DefinedAtom::scopeGlobal) in deadStripOptimize() 479 if (auto *definedAtom = dyn_cast<DefinedAtom>(atom.get())) { in addAtoms()
|