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