Lines Matching refs:RelEntry
354 uint64_t getProvisionalValue(const WasmRelocationEntry &RelEntry,
359 uint32_t getRelocationIndexValue(const WasmRelocationEntry &RelEntry);
644 WasmObjectWriter::getProvisionalValue(const WasmRelocationEntry &RelEntry, in getProvisionalValue() argument
646 if ((RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_LEB || in getProvisionalValue()
647 RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_I32) && in getProvisionalValue()
648 !RelEntry.Symbol->isGlobal()) { in getProvisionalValue()
649 assert(GOTIndices.count(RelEntry.Symbol) > 0 && "symbol not found in GOT index space"); in getProvisionalValue()
650 return GOTIndices[RelEntry.Symbol]; in getProvisionalValue()
653 switch (RelEntry.Type) { in getProvisionalValue()
662 cast<MCSymbolWasm>(Layout.getBaseSymbol(*RelEntry.Symbol)); in getProvisionalValue()
664 if (RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB || in getProvisionalValue()
665 RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB64) in getProvisionalValue()
672 return getRelocationIndexValue(RelEntry); in getProvisionalValue()
680 assert(WasmIndices.count(RelEntry.Symbol) > 0 && "symbol not found in wasm index space"); in getProvisionalValue()
681 return WasmIndices[RelEntry.Symbol]; in getProvisionalValue()
685 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
688 static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection()); in getProvisionalValue()
689 return Section.getSectionOffset() + RelEntry.Addend; in getProvisionalValue()
704 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
706 const wasm::WasmDataReference &SymRef = DataLocations[RelEntry.Symbol]; in getProvisionalValue()
709 return Segment.Offset + SymRef.Offset + RelEntry.Addend; in getProvisionalValue()
755 WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) { in getRelocationIndexValue() argument
756 if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) { in getRelocationIndexValue()
757 if (!TypeIndices.count(RelEntry.Symbol)) in getRelocationIndexValue()
759 RelEntry.Symbol->getName()); in getRelocationIndexValue()
760 return TypeIndices[RelEntry.Symbol]; in getRelocationIndexValue()
763 return RelEntry.Symbol->getIndex(); in getRelocationIndexValue()
772 for (const WasmRelocationEntry &RelEntry : Relocations) { in applyRelocations() local
774 RelEntry.FixupSection->getSectionOffset() + in applyRelocations()
775 RelEntry.Offset; in applyRelocations()
777 LLVM_DEBUG(dbgs() << "applyRelocation: " << RelEntry << "\n"); in applyRelocations()
778 uint64_t Value = getProvisionalValue(RelEntry, Layout); in applyRelocations()
780 switch (RelEntry.Type) { in applyRelocations()
1134 for (const WasmRelocationEntry &RelEntry : Relocs) { in writeRelocSection() local
1136 RelEntry.Offset + RelEntry.FixupSection->getSectionOffset(); in writeRelocSection()
1137 uint32_t Index = getRelocationIndexValue(RelEntry); in writeRelocSection()
1139 W->OS << char(RelEntry.Type); in writeRelocSection()
1142 if (RelEntry.hasAddend()) in writeRelocSection()
1143 encodeSLEB128(RelEntry.Addend, W->OS); in writeRelocSection()
1844 for (const WasmRelocationEntry &RelEntry : CodeRelocations) in writeOneObject() local
1845 HandleReloc(RelEntry); in writeOneObject()
1846 for (const WasmRelocationEntry &RelEntry : DataRelocations) in writeOneObject() local
1847 HandleReloc(RelEntry); in writeOneObject()