LLVM: lib/ExecutionEngine/JITLink/ELF_aarch64.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

19

24

25#define DEBUG_TYPE "jitlink"

26

27using namespace llvm;

29

30namespace {

31

32constexpr StringRef ELFGOTSymbolName = "_GLOBAL_OFFSET_TABLE_";

33

34class ELFJITLinker_aarch64 : public JITLinker<ELFJITLinker_aarch64> {

35 friend class JITLinker<ELFJITLinker_aarch64>;

36

37public:

38 ELFJITLinker_aarch64(std::unique_ptr Ctx,

39 std::unique_ptr G,

41 : JITLinker(std::move(Ctx), std::move(G), std::move(PassConfig)) {

42 if (shouldAddDefaultTargetPasses(getGraph().getTargetTriple()))

43 getPassConfig().PostAllocationPasses.push_back(

44 [this](LinkGraph &G) { return getOrCreateGOTSymbol(G); });

45 }

46

47private:

48 Symbol *GOTSymbol = nullptr;

49

52 }

53

55 auto InteredGOTSymbolName =

56 G.getSymbolStringPool()->intern(ELFGOTSymbolName);

57

58 auto DefineExternalGOTSymbolIfPresent =

61 if (*Sym.getName() == ELFGOTSymbolName)

62 if (auto *GOTSection = G.findSectionByName(

64 GOTSymbol = &Sym;

65 return {*GOTSection, true};

66 }

67 return {};

68 });

69

70

71

72 if (auto Err = DefineExternalGOTSymbolIfPresent(G))

73 return Err;

74

75

76 if (GOTSymbol)

78

79

80

81

82 if (auto *GOTSection =

84

85

86 for (auto *Sym : GOTSection->symbols())

87 if (Sym->getName() == InteredGOTSymbolName) {

88 GOTSymbol = Sym;

90 }

91

92

95 GOTSymbol =

96

99 else

100 GOTSymbol =

101 &G.addDefinedSymbol(*SR.getFirstBlock(), 0, InteredGOTSymbolName, 0,

103 }

104

105

106

107

108 if (!GOTSymbol) {

109 for (auto *Sym : G.external_symbols()) {

110 if (*Sym->getName() == ELFGOTSymbolName) {

111 auto Blocks = G.blocks();

112 if (!Blocks.empty()) {

113 G.makeAbsolute(*Sym, (*Blocks.begin())->getAddress());

114 GOTSymbol = Sym;

115 break;

116 }

117 }

118 }

119 }

120

122 }

123};

124

125template

127private:

128 enum ELFAArch64RelocationKind : Edge::Kind {

129 ELFCall26 = Edge::FirstRelocation,

130 ELFLdrLo19,

131 ELFAdrLo21,

132 ELFAdrPage21,

133 ELFAddAbs12,

134 ELFLdSt8Abs12,

135 ELFLdSt16Abs12,

136 ELFLdSt32Abs12,

137 ELFLdSt64Abs12,

138 ELFLdSt128Abs12,

139 ELFMovwAbsG0,

140 ELFMovwAbsG1,

141 ELFMovwAbsG2,

142 ELFMovwAbsG3,

143 ELFTstBr14,

144 ELFCondBr19,

145 ELFAbs32,

146 ELFAbs64,

147 ELFPrel32,

148 ELFPrel64,

149 ELFAdrGOTPage21,

150 ELFLd64GOTLo12,

151 ELFLd64GOTPAGELo15,

152 ELFTLSDescAdrPage21,

153 ELFTLSDescAddLo12,

154 ELFTLSDescLd64Lo12,

155 ELFTLSDescCall,

156 };

157

161 switch (Type) {

162 case ELF::R_AARCH64_CALL26:

163 case ELF::R_AARCH64_JUMP26:

164 return ELFCall26;

165 case ELF::R_AARCH64_LD_PREL_LO19:

166 return ELFLdrLo19;

167 case ELF::R_AARCH64_ADR_PREL_LO21:

168 return ELFAdrLo21;

169 case ELF::R_AARCH64_ADR_PREL_PG_HI21:

170 return ELFAdrPage21;

171 case ELF::R_AARCH64_ADD_ABS_LO12_NC:

172 return ELFAddAbs12;

173 case ELF::R_AARCH64_LDST8_ABS_LO12_NC:

174 return ELFLdSt8Abs12;

175 case ELF::R_AARCH64_LDST16_ABS_LO12_NC:

176 return ELFLdSt16Abs12;

177 case ELF::R_AARCH64_LDST32_ABS_LO12_NC:

178 return ELFLdSt32Abs12;

179 case ELF::R_AARCH64_LDST64_ABS_LO12_NC:

180 return ELFLdSt64Abs12;

181 case ELF::R_AARCH64_LDST128_ABS_LO12_NC:

182 return ELFLdSt128Abs12;

183 case ELF::R_AARCH64_MOVW_UABS_G0_NC:

184 return ELFMovwAbsG0;

185 case ELF::R_AARCH64_MOVW_UABS_G1_NC:

186 return ELFMovwAbsG1;

187 case ELF::R_AARCH64_MOVW_UABS_G2_NC:

188 return ELFMovwAbsG2;

189 case ELF::R_AARCH64_MOVW_UABS_G3:

190 return ELFMovwAbsG3;

191 case ELF::R_AARCH64_TSTBR14:

192 return ELFTstBr14;

193 case ELF::R_AARCH64_CONDBR19:

194 return ELFCondBr19;

195 case ELF::R_AARCH64_ABS32:

196 return ELFAbs32;

197 case ELF::R_AARCH64_ABS64:

198 return ELFAbs64;

199 case ELF::R_AARCH64_PREL32:

200 return ELFPrel32;

201 case ELF::R_AARCH64_PREL64:

202 return ELFPrel64;

203 case ELF::R_AARCH64_ADR_GOT_PAGE:

204 return ELFAdrGOTPage21;

205 case ELF::R_AARCH64_LD64_GOT_LO12_NC:

206 return ELFLd64GOTLo12;

207 case ELF::R_AARCH64_LD64_GOTPAGE_LO15:

208 return ELFLd64GOTPAGELo15;

209 case ELF::R_AARCH64_TLSDESC_ADR_PAGE21:

210 return ELFTLSDescAdrPage21;

211 case ELF::R_AARCH64_TLSDESC_ADD_LO12:

212 return ELFTLSDescAddLo12;

213 case ELF::R_AARCH64_TLSDESC_LD64_LO12:

214 return ELFTLSDescLd64Lo12;

215 case ELF::R_AARCH64_TLSDESC_CALL:

216 return ELFTLSDescCall;

217 }

218

220 "Unsupported aarch64 relocation:" + formatv("{0:d}: ", Type) +

222 }

223

224 Error addRelocations() override {

226

228 using Self = ELFLinkGraphBuilder_aarch64;

229 for (const auto &RelSect : Base::Sections)

230 if (Error Err = Base::forEachRelaRelocation(RelSect, this,

231 &Self::addSingleRelocation))

232 return Err;

233

235 }

236

237 Error addSingleRelocation(const typename ELFT::Rela &Rel,

238 const typename ELFT::Shdr &FixupSect,

239 Block &BlockToFix) {

242

243 uint32_t SymbolIndex = Rel.getSymbol(false);

244 auto ObjSymbol = Base::Obj.getRelocationSymbol(Rel, Base::SymTabSec);

245 if (!ObjSymbol)

246 return ObjSymbol.takeError();

247

248 Symbol *GraphSymbol = Base::getGraphSymbol(SymbolIndex);

249 if (!GraphSymbol)

251 formatv("Could not find symbol at given index, did you add it to "

252 "JITSymbolTable? index: {0}, shndx: {1} Size of table: {2}",

253 SymbolIndex, (*ObjSymbol)->st_shndx,

254 Base::GraphSymbols.size()),

256

259 if (!RelocKind)

261

262 int64_t Addend = Rel.r_addend;

265 Edge::OffsetT Offset = FixupAddress - BlockToFix.getAddress();

266

267

268 const void *FixupContent = BlockToFix.getContent().data() +

269 (FixupAddress - BlockToFix.getAddress());

270

271 Edge::Kind Kind = Edge::Invalid;

272

273 switch (*RelocKind) {

274 case ELFCall26: {

276 break;

277 }

278 case ELFLdrLo19: {

279 uint32_t Instr = *(const ulittle32_t *)FixupContent;

282 "R_AARCH64_LDR_PREL_LO19 target is not an LDR Literal instruction");

283

285 break;

286 }

287 case ELFAdrLo21: {

288 uint32_t Instr = *(const ulittle32_t *)FixupContent;

291 "R_AARCH64_ADR_PREL_LO21 target is not an ADR instruction");

292

294 break;

295 }

296 case ELFAdrPage21: {

298 break;

299 }

300 case ELFAddAbs12: {

302 break;

303 }

304 case ELFLdSt8Abs12: {

305 uint32_t Instr = *(const ulittle32_t *)FixupContent;

309 "R_AARCH64_LDST8_ABS_LO12_NC target is not a "

310 "LDRB/STRB (imm12) instruction");

311

313 break;

314 }

315 case ELFLdSt16Abs12: {

316 uint32_t Instr = *(const ulittle32_t *)FixupContent;

320 "R_AARCH64_LDST16_ABS_LO12_NC target is not a "

321 "LDRH/STRH (imm12) instruction");

322

324 break;

325 }

326 case ELFLdSt32Abs12: {

327 uint32_t Instr = *(const ulittle32_t *)FixupContent;

331 "R_AARCH64_LDST32_ABS_LO12_NC target is not a "

332 "LDR/STR (imm12, 32 bit) instruction");

333

335 break;

336 }

337 case ELFLdSt64Abs12: {

338 uint32_t Instr = *(const ulittle32_t *)FixupContent;

342 "R_AARCH64_LDST64_ABS_LO12_NC target is not a "

343 "LDR/STR (imm12, 64 bit) instruction");

344

346 break;

347 }

348 case ELFLdSt128Abs12: {

349 uint32_t Instr = *(const ulittle32_t *)FixupContent;

353 "R_AARCH64_LDST128_ABS_LO12_NC target is not a "

354 "LDR/STR (imm12, 128 bit) instruction");

355

357 break;

358 }

359 case ELFMovwAbsG0: {

360 uint32_t Instr = *(const ulittle32_t *)FixupContent;

364 "R_AARCH64_MOVW_UABS_G0_NC target is not a "

365 "MOVK/MOVZ (imm16, LSL #0) instruction");

366

368 break;

369 }

370 case ELFMovwAbsG1: {

371 uint32_t Instr = *(const ulittle32_t *)FixupContent;

375 "R_AARCH64_MOVW_UABS_G1_NC target is not a "

376 "MOVK/MOVZ (imm16, LSL #16) instruction");

377

379 break;

380 }

381 case ELFMovwAbsG2: {

382 uint32_t Instr = *(const ulittle32_t *)FixupContent;

386 "R_AARCH64_MOVW_UABS_G2_NC target is not a "

387 "MOVK/MOVZ (imm16, LSL #32) instruction");

388

390 break;

391 }

392 case ELFMovwAbsG3: {

393 uint32_t Instr = *(const ulittle32_t *)FixupContent;

397 "R_AARCH64_MOVW_UABS_G3 target is not a "

398 "MOVK/MOVZ (imm16, LSL #48) instruction");

399

401 break;

402 }

403 case ELFTstBr14: {

404 uint32_t Instr = *(const ulittle32_t *)FixupContent;

407 "test and branch instruction");

408

410 break;

411 }

412 case ELFCondBr19: {

413 uint32_t Instr = *(const ulittle32_t *)FixupContent;

417 "conditional branch instruction");

418

420 break;

421 }

422 case ELFAbs32: {

424 break;

425 }

426 case ELFAbs64: {

428 break;

429 }

430 case ELFPrel32: {

432 break;

433 }

434 case ELFPrel64: {

436 break;

437 }

438 case ELFAdrGOTPage21: {

440 break;

441 }

442 case ELFLd64GOTLo12: {

444 break;

445 }

446 case ELFLd64GOTPAGELo15: {

448 break;

449 }

450 case ELFTLSDescAdrPage21: {

452 break;

453 }

454 case ELFTLSDescAddLo12:

455 case ELFTLSDescLd64Lo12: {

457 break;

458 }

459 case ELFTLSDescCall: {

461 }

462 };

463

464 Edge GE(Kind, Offset, *GraphSymbol, Addend);

466 dbgs() << " ";

468 dbgs() << "\n";

469 });

470

471 BlockToFix.addEdge(std::move(GE));

472

474 }

475

476

477 const char *getELFAArch64RelocationKindName(Edge::Kind R) {

478 switch (R) {

479 case ELFCall26:

480 return "ELFCall26";

481 case ELFAdrPage21:

482 return "ELFAdrPage21";

483 case ELFAddAbs12:

484 return "ELFAddAbs12";

485 case ELFLdSt8Abs12:

486 return "ELFLdSt8Abs12";

487 case ELFLdSt16Abs12:

488 return "ELFLdSt16Abs12";

489 case ELFLdSt32Abs12:

490 return "ELFLdSt32Abs12";

491 case ELFLdSt64Abs12:

492 return "ELFLdSt64Abs12";

493 case ELFLdSt128Abs12:

494 return "ELFLdSt128Abs12";

495 case ELFMovwAbsG0:

496 return "ELFMovwAbsG0";

497 case ELFMovwAbsG1:

498 return "ELFMovwAbsG1";

499 case ELFMovwAbsG2:

500 return "ELFMovwAbsG2";

501 case ELFMovwAbsG3:

502 return "ELFMovwAbsG3";

503 case ELFAbs32:

504 return "ELFAbs32";

505 case ELFAbs64:

506 return "ELFAbs64";

507 case ELFPrel32:

508 return "ELFPrel32";

509 case ELFPrel64:

510 return "ELFPrel64";

511 case ELFAdrGOTPage21:

512 return "ELFAdrGOTPage21";

513 case ELFLd64GOTLo12:

514 return "ELFLd64GOTLo12";

515 case ELFLd64GOTPAGELo15:

516 return "ELFLd64GOTPAGELo15";

517 case ELFTLSDescAdrPage21:

518 return "ELFTLSDescAdrPage21";

519 case ELFTLSDescAddLo12:

520 return "ELFTLSDescAddLo12";

521 case ELFTLSDescLd64Lo12:

522 return "ELFTLSDescLd64Lo12";

523 case ELFTLSDescCall:

524 return "ELFTLSDescCall";

525 default:

527 }

528 }

529

530public:

531 ELFLinkGraphBuilder_aarch64(StringRef FileName,

533 std::shared_ptrorc::SymbolStringPool SSP,

535

537 std::move(Features), FileName,

539};

540

541

542class TLSInfoTableManager_ELF_aarch64

543 : public TableManager<TLSInfoTableManager_ELF_aarch64> {

544public:

546

547 static const uint8_t TLSInfoEntryContent[16];

548

550

552

553

554 auto &TLSInfoEntry = G.createMutableContentBlock(

555 getTLSInfoSection(G), G.allocateContent(getTLSInfoEntryContent()),

558 return G.addAnonymousSymbol(TLSInfoEntry, 0, 16, false, false);

559 }

560

561private:

563 if (!TLSInfoTable)

565 return *TLSInfoTable;

566 }

567

569 return {reinterpret_cast<const char *>(TLSInfoEntryContent),

570 sizeof(TLSInfoEntryContent)};

571 }

572

573 Section *TLSInfoTable = nullptr;

574};

575

576const uint8_t TLSInfoTableManager_ELF_aarch64::TLSInfoEntryContent[16] = {

577 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

579};

580

581

582class TLSDescTableManager_ELF_aarch64

583 : public TableManager<TLSDescTableManager_ELF_aarch64> {

584public:

585 TLSDescTableManager_ELF_aarch64(

586 TLSInfoTableManager_ELF_aarch64 &TLSInfoTableManager)

587 : TLSInfoTableManager(TLSInfoTableManager) {}

588

590

591 static const uint8_t TLSDescEntryContent[16];

592

594 Edge::Kind KindToSet = Edge::Invalid;

595 switch (E.getKind()) {

598 break;

599 }

602 break;

603 }

604 default:

605 return false;

606 }

607 assert(KindToSet != Edge::Invalid &&

608 "Fell through switch, but no new kind to set");

610 dbgs() << " Fixing " << G.getEdgeKindName(E.getKind()) << " edge at "

611 << B->getFixupAddress(E) << " (" << B->getAddress() << " + "

612 << formatv("{0:x}", E.getOffset()) << ")\n";

613 });

614 E.setKind(KindToSet);

615 E.setTarget(getEntryForTarget(G, E.getTarget()));

616 return true;

617 }

618

620 auto &EntryBlock =

621 G.createContentBlock(getTLSDescSection(G), getTLSDescBlockContent(),

625 TLSInfoTableManager.getEntryForTarget(G, Target), 0);

626 return G.addAnonymousSymbol(EntryBlock, 0, 8, false, false);

627 }

628

629private:

631 if (!GOTSection)

633 return *GOTSection;

634 }

635

637 if (!TLSDescResolver)

638 TLSDescResolver = &G.addExternalSymbol("__tlsdesc_resolver", 8, false);

639 return *TLSDescResolver;

640 }

641

643 return {reinterpret_cast<const char *>(TLSDescEntryContent),

644 sizeof(TLSDescEntryContent)};

645 }

646

647 Section *GOTSection = nullptr;

648 Symbol *TLSDescResolver = nullptr;

649 TLSInfoTableManager_ELF_aarch64 &TLSInfoTableManager;

650};

651

652const uint8_t TLSDescTableManager_ELF_aarch64::TLSDescEntryContent[16] = {

653 0x00, 0x00, 0x00, 0x00,

654 0x00, 0x00, 0x00, 0x00,

655 0x00, 0x00, 0x00, 0x00,

656 0x00, 0x00, 0x00, 0x00

657};

658

661

664 TLSInfoTableManager_ELF_aarch64 TLSInfo;

665 TLSDescTableManager_ELF_aarch64 TLSDesc(TLSInfo);

668}

669

670}

671

672namespace llvm {

674

676 MemoryBufferRef ObjectBuffer, std::shared_ptrorc::SymbolStringPool SSP) {

678 dbgs() << "Building jitlink graph for new input "

680 });

681

683 if (!ELFObj)

684 return ELFObj.takeError();

685

686 auto Features = (*ELFObj)->getFeatures();

687 if (!Features)

688 return Features.takeError();

689

691 "Only AArch64 (little endian) is supported for now");

692

694 return ELFLinkGraphBuilder_aarch64object::ELF64LE(

695 (*ELFObj)->getFileName(), ELFObjFile.getELFFile(), std::move(SSP),

696 (*ELFObj)->makeTriple(), std::move(*Features))

697 .buildGraph();

698}

699

701 std::unique_ptr Ctx) {

703 const Triple &TT = G->getTargetTriple();

704 if (Ctx->shouldAddDefaultTargetPasses(TT)) {

705

711

712

713 if (auto MarkLive = Ctx->getMarkLivePass(TT))

714 Config.PrePrunePasses.push_back(std::move(MarkLive));

715 else

717

718

722

723

724 Config.PostPrunePasses.push_back(buildTables_ELF_aarch64);

725 }

726

727 if (auto Err = Ctx->modifyPassConfig(*G, Config))

728 return Ctx->notifyFailed(std::move(Err));

729

730 ELFJITLinker_aarch64::link(std::move(Ctx), std::move(G), std::move(Config));

731}

732

733}

734}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

#define DEBUG_WITH_TYPE(TYPE,...)

DEBUG_WITH_TYPE macro - This macro should be used by passes to emit debug information.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

Tagged union holding either a T or a Error.

Error takeError()

Take ownership of the stored error.

StringRef getBufferIdentifier() const

StringRef - Represent a constant reference to a string, i.e.

Manages the enabling and disabling of subtarget specific features.

Target - Wrapper for Target specific information.

Triple - Helper class for working with autoconf configuration names.

The instances of the Type class are immutable: once they are created, they are never changed.

orc::ExecutorAddr getAddress() const

An Addressable with content and edges.

ArrayRef< char > getContent() const

Get the content for this block. Block must not be a zero-fill block.

void addEdge(Edge::Kind K, Edge::OffsetT Offset, Symbol &Target, Edge::AddendT Addend)

Add an edge to this block.

A LinkGraph pass that splits blocks in a section that follows the DWARF Record format into sub-blocks...

A LinkGraph pass that adds missing FDE-to-CIE, FDE-to-PC and FDE-to-LSDA edges.

LinkGraph building code that's specific to the given ELFT, but common across all architectures.

Represents fixups and constraints in the LinkGraph.

Represents a section address range via a pair of Block pointers to the first and last Blocks in the s...

Block * getFirstBlock() const

Represents an object file section.

const orc::SymbolStringPtr & getName() const

Returns the name of this symbol (empty if the symbol is anonymous).

orc::ExecutorAddr getAddress() const

Returns the address of this symbol.

A CRTP base for tables that are built on demand, e.g.

Global Offset Table Builder.

static StringRef getSectionName()

Procedure Linkage Table Builder.

static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object, bool InitContent=true)

Represents an address in the executor process.

static constexpr const StringLiteral & getSectionName(DebugSectionKind SectionKind)

Return the name of the section.

bool isLDRLiteral(uint32_t Instr)

bool isADR(uint32_t Instr)

bool isCondBranchImm19(uint32_t Instr)

Error applyFixup(LinkGraph &G, Block &B, const Edge &E, const Symbol *GOTSymbol)

Apply fixup expression for edge to block content.

bool isMoveWideImm16(uint32_t Instr)

bool isCompAndBranchImm19(uint32_t Instr)

bool isLoadStoreImm12(uint32_t Instr)

LLVM_ABI const char * getEdgeKindName(Edge::Kind K)

Returns a string name for the given aarch64 edge.

@ LDRLiteral19

The signed 21-bit delta from the fixup to the target.

@ RequestGOTAndTransformToPageOffset15

A GOT entry getter/constructor, transformed to Pageoffset15 pointing at the GOT entry for the origina...

@ CondBranch19PCRel

A 19-bit PC-relative conditional branch.

@ RequestTLSDescEntryAndTransformToPageOffset12

A TLSDesc entry getter/constructor, transformed to PageOffset12.

@ Page21

The signed 21-bit delta from the fixup page to the page containing the target.

@ Branch26PCRel

A 26-bit PC-relative branch.

@ Pointer64

A plain 64-bit pointer value relocation.

@ Pointer32

A plain 32-bit pointer value relocation.

@ MoveWide16

A 16-bit slice of the target address (which slice depends on the instruction at the fixup location).

@ TestAndBranch14PCRel

A 14-bit PC-relative test and branch.

@ RequestGOTAndTransformToPage21

A GOT entry getter/constructor, transformed to Page21 pointing at the GOT entry for the original targ...

@ ADRLiteral21

The signed 21-bit delta from the fixup to the target.

@ RequestGOTAndTransformToPageOffset12

A GOT entry getter/constructor, transformed to Pageoffset12 pointing at the GOT entry for the origina...

@ NegDelta32

A 32-bit negative delta.

@ PageOffset12

The 12-bit (potentially shifted) offset of the target within its page.

@ RequestTLSDescEntryAndTransformToPage21

A TLSDesc entry getter/constructor, transformed to Page21.

bool isTestAndBranchImm14(uint32_t Instr)

unsigned getPageOffset12Shift(uint32_t Instr)

unsigned getMoveWide16Shift(uint32_t Instr)

LLVM_ABI const char * getGenericEdgeKindName(Edge::Kind K)

Returns the string name of the given generic edge kind, or "unknown" otherwise.

void visitExistingEdges(LinkGraph &G, VisitorTs &&...Vs)

For each edge in the given graph, apply a list of visitors to the edge, stopping when the first visit...

LLVM_ABI Error markAllSymbolsLive(LinkGraph &G)

Marks all symbols in a graph live.

void link_ELF_aarch64(std::unique_ptr< LinkGraph > G, std::unique_ptr< JITLinkContext > Ctx)

jit-link the given object buffer, which must be a ELF aarch64 relocatable object file.

Definition ELF_aarch64.cpp:700

Expected< std::unique_ptr< LinkGraph > > createLinkGraphFromELFObject_aarch64(MemoryBufferRef ObjectBuffer, std::shared_ptr< orc::SymbolStringPool > SSP)

Create a LinkGraph from an ELF/aarch64 relocatable object.

Definition ELF_aarch64.cpp:675

LLVM_ABI void printEdge(raw_ostream &OS, const Block &B, const Edge &E, StringRef EdgeKindName)

SectionRangeSymbolDesc identifyELFSectionStartAndEndSymbols(LinkGraph &G, Symbol &Sym)

ELF section start/end symbol detection.

void visitEdge(LinkGraph &G, Block *B, Edge &E)

Base case for edge-visitors where the visitor-list is empty.

DefineExternalSectionStartAndEndSymbols< SymbolIdentifierFunction > createDefineExternalSectionStartAndEndSymbolsPass(SymbolIdentifierFunction &&F)

Returns a JITLink pass (as a function class) that uses the given symbol identification function to id...

LLVM_ABI StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type)

detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI std::error_code inconvertibleErrorCode()

The value returned by this function can be returned from convertToErrorCode for Error values where no...

auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)

LLVM_ABI raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes...

LinkGraphPassList PostAllocationPasses

Post-allocation passes.

LinkGraphPassList PostPrunePasses

Post-prune passes.

LinkGraphPassList PrePrunePasses

Pre-prune passes.