Lines Matching refs:G

43   bool visitEdge(LinkGraph &G, Block *B, Edge &E) {  in visitEdge()  argument
48 E.setTarget(this->getEntryForTarget(G, E.getTarget())); in visitEdge()
52 E.setTarget(this->getEntryForTarget(G, E.getTarget())); in visitEdge()
56 E.setTarget(this->getEntryForTarget(G, E.getTarget())); in visitEdge()
63 Symbol &createEntry(LinkGraph &G, Symbol &Target) { in createEntry() argument
66 auto &TLSInfoEntry = G.createMutableContentBlock( in createEntry()
67 getTLSInfoSection(G), G.allocateContent(getTLSInfoEntryContent()), in createEntry()
70 return G.addAnonymousSymbol(TLSInfoEntry, 0, 16, false, false); in createEntry()
74 Section &getTLSInfoSection(LinkGraph &G) { in getTLSInfoSection() argument
77 &G.createSection(ELFTLSInfoSectionName, orc::MemProt::Read); in getTLSInfoSection()
104 Symbol &createELFGOTHeader(LinkGraph &G, in createELFGOTHeader() argument
108 for (Symbol *Sym : G.defined_symbols()) in createELFGOTHeader()
115 for (Symbol *Sym : G.external_symbols()) in createELFGOTHeader()
123 TOCSymbol = &G.addExternalSymbol(ELFTOCSymbolName, 0, false); in createELFGOTHeader()
125 return TOC.getEntryForTarget(G, *TOCSymbol); in createELFGOTHeader()
131 registerExistingGOTEntries(LinkGraph &G, in registerExistingGOTEntries() argument
136 if (Section *dotTOCSection = G.findSectionByName(".toc")) { in registerExistingGOTEntries()
141 G.addAnonymousSymbol(*B, E.getOffset(), in registerExistingGOTEntries()
142 G.getPointerSize(), in registerExistingGOTEntries()
148 Error buildTables_ELF_ppc64(LinkGraph &G) { in buildTables_ELF_ppc64() argument
156 createELFGOTHeader(G, TOC); in buildTables_ELF_ppc64()
159 registerExistingGOTEntries(G, TOC); in buildTables_ELF_ppc64()
163 visitExistingEdges(G, TOC, PLT, TLSInfo); in buildTables_ELF_ppc64()
170 if (Section *TOCSection = G.findSectionByName(TOC.getSectionName())) { in buildTables_ELF_ppc64()
173 if (Section *gotSection = G.findSectionByName(".got")) in buildTables_ELF_ppc64()
174 G.mergeSections(*TOCSection, *gotSection); in buildTables_ELF_ppc64()
175 if (Section *tocSection = G.findSectionByName(".toc")) in buildTables_ELF_ppc64()
176 G.mergeSections(*TOCSection, *tocSection); in buildTables_ELF_ppc64()
177 if (Section *sdataSection = G.findSectionByName(".sdata")) in buildTables_ELF_ppc64()
178 G.mergeSections(*TOCSection, *sdataSection); in buildTables_ELF_ppc64()
179 if (Section *sbssSection = G.findSectionByName(".sbss")) in buildTables_ELF_ppc64()
180 G.mergeSections(*TOCSection, *sbssSection); in buildTables_ELF_ppc64()
183 if (Section *tocbssSection = G.findSectionByName(".tocbss")) in buildTables_ELF_ppc64()
184 G.mergeSections(*TOCSection, *tocbssSection); in buildTables_ELF_ppc64()
185 if (Section *pltSection = G.findSectionByName(".plt")) in buildTables_ELF_ppc64()
186 G.mergeSections(*TOCSection, *pltSection); in buildTables_ELF_ppc64()
203 using Base::G; // Use LinkGraph pointer from base class.
213 G->getTargetTriple().getArchName() + in addRelocations()
273 "In " + G->getName() + ": Unsupported ppc64 relocation type " + in addSingleRelocation()
409 std::unique_ptr<LinkGraph> G, PassConfiguration PassConfig) in ELFJITLinker_ppc64() argument
410 : JITLinkerBase(std::move(Ctx), std::move(G), std::move(PassConfig)) { in ELFJITLinker_ppc64()
412 [this](LinkGraph &G) { return defineTOCBase(G); }); in ELFJITLinker_ppc64() argument
418 Error defineTOCBase(LinkGraph &G) { in defineTOCBase() argument
419 for (Symbol *Sym : G.defined_symbols()) { in defineTOCBase()
429 for (Symbol *Sym : G.external_symbols()) { in defineTOCBase()
436 if (Section *TOCSection = G.findSectionByName( in defineTOCBase()
446 G.makeAbsolute(*TOCSymbol, TOCBaseAddr); in defineTOCBase()
448 G.addAbsoluteSymbol(TOCSymbolAliasIdent, TOCSymbol->getAddress(), in defineTOCBase()
459 Error applyFixup(LinkGraph &G, Block &B, const Edge &E) const { in applyFixup() argument
460 return ppc64::applyFixup<Endianness>(G, B, E, TOCSymbol); in applyFixup()
489 void link_ELF_ppc64(std::unique_ptr<LinkGraph> G, in link_ELF_ppc64() argument
493 if (Ctx->shouldAddDefaultTargetPasses(G->getTargetTriple())) { in link_ELF_ppc64()
499 ".eh_frame", G->getPointerSize(), ppc64::Pointer32, ppc64::Pointer64, in link_ELF_ppc64()
504 if (auto MarkLive = Ctx->getMarkLivePass(G->getTargetTriple())) in link_ELF_ppc64()
512 if (auto Err = Ctx->modifyPassConfig(*G, Config)) in link_ELF_ppc64()
515 ELFJITLinker_ppc64<Endianness>::link(std::move(Ctx), std::move(G), in link_ELF_ppc64()
532 void link_ELF_ppc64(std::unique_ptr<LinkGraph> G, in link_ELF_ppc64() argument
534 return link_ELF_ppc64<llvm::endianness::big>(std::move(G), std::move(Ctx)); in link_ELF_ppc64()
538 void link_ELF_ppc64le(std::unique_ptr<LinkGraph> G, in link_ELF_ppc64le() argument
540 return link_ELF_ppc64<llvm::endianness::little>(std::move(G), std::move(Ctx)); in link_ELF_ppc64le()