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()
679 assert(WasmIndices.count(RelEntry.Symbol) > 0 && "symbol not found in wasm index space"); in getProvisionalValue()
680 return WasmIndices[RelEntry.Symbol]; in getProvisionalValue()
684 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
687 static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection()); in getProvisionalValue()
688 return Section.getSectionOffset() + RelEntry.Addend; in getProvisionalValue()
703 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
705 const wasm::WasmDataReference &SymRef = DataLocations[RelEntry.Symbol]; in getProvisionalValue()
708 return Segment.Offset + SymRef.Offset + RelEntry.Addend; in getProvisionalValue()
754 WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) { in getRelocationIndexValue() argument
755 if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) { in getRelocationIndexValue()
756 if (!TypeIndices.count(RelEntry.Symbol)) in getRelocationIndexValue()
758 RelEntry.Symbol->getName()); in getRelocationIndexValue()
759 return TypeIndices[RelEntry.Symbol]; in getRelocationIndexValue()
762 return RelEntry.Symbol->getIndex(); in getRelocationIndexValue()
771 for (const WasmRelocationEntry &RelEntry : Relocations) { in applyRelocations() local
773 RelEntry.FixupSection->getSectionOffset() + in applyRelocations()
774 RelEntry.Offset; in applyRelocations()
776 LLVM_DEBUG(dbgs() << "applyRelocation: " << RelEntry << "\n"); in applyRelocations()
777 uint64_t Value = getProvisionalValue(RelEntry, Layout); in applyRelocations()
779 switch (RelEntry.Type) { in applyRelocations()
1135 for (const WasmRelocationEntry &RelEntry : Relocs) { in writeRelocSection() local
1137 RelEntry.Offset + RelEntry.FixupSection->getSectionOffset(); in writeRelocSection()
1138 uint32_t Index = getRelocationIndexValue(RelEntry); in writeRelocSection()
1140 W->OS << char(RelEntry.Type); in writeRelocSection()
1143 if (RelEntry.hasAddend()) in writeRelocSection()
1144 encodeSLEB128(RelEntry.Addend, W->OS); in writeRelocSection()
1850 for (const WasmRelocationEntry &RelEntry : CodeRelocations) in writeOneObject() local
1851 HandleReloc(RelEntry); in writeOneObject()
1852 for (const WasmRelocationEntry &RelEntry : DataRelocations) in writeOneObject() local
1853 HandleReloc(RelEntry); in writeOneObject()