Lines Matching refs:RelEntry

333   uint64_t getProvisionalValue(const WasmRelocationEntry &RelEntry,
338 uint32_t getRelocationIndexValue(const WasmRelocationEntry &RelEntry);
590 WasmObjectWriter::getProvisionalValue(const WasmRelocationEntry &RelEntry, in getProvisionalValue() argument
592 if ((RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_LEB || in getProvisionalValue()
593 RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_I32) && in getProvisionalValue()
594 !RelEntry.Symbol->isGlobal()) { in getProvisionalValue()
595 assert(GOTIndices.count(RelEntry.Symbol) > 0 && "symbol not found in GOT index space"); in getProvisionalValue()
596 return GOTIndices[RelEntry.Symbol]; in getProvisionalValue()
599 switch (RelEntry.Type) { in getProvisionalValue()
608 cast<MCSymbolWasm>(Layout.getBaseSymbol(*RelEntry.Symbol)); in getProvisionalValue()
610 if (RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB || in getProvisionalValue()
611 RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB64) in getProvisionalValue()
618 return getRelocationIndexValue(RelEntry); in getProvisionalValue()
625 assert(WasmIndices.count(RelEntry.Symbol) > 0 && "symbol not found in wasm index space"); in getProvisionalValue()
626 return WasmIndices[RelEntry.Symbol]; in getProvisionalValue()
630 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
633 static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection()); in getProvisionalValue()
634 return Section.getSectionOffset() + RelEntry.Addend; in getProvisionalValue()
649 if (!RelEntry.Symbol->isDefined()) in getProvisionalValue()
651 const wasm::WasmDataReference &SymRef = DataLocations[RelEntry.Symbol]; in getProvisionalValue()
654 return Segment.Offset + SymRef.Offset + RelEntry.Addend; in getProvisionalValue()
700 WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) { in getRelocationIndexValue() argument
701 if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) { in getRelocationIndexValue()
702 if (!TypeIndices.count(RelEntry.Symbol)) in getRelocationIndexValue()
704 RelEntry.Symbol->getName()); in getRelocationIndexValue()
705 return TypeIndices[RelEntry.Symbol]; in getRelocationIndexValue()
708 return RelEntry.Symbol->getIndex(); in getRelocationIndexValue()
717 for (const WasmRelocationEntry &RelEntry : Relocations) { in applyRelocations() local
719 RelEntry.FixupSection->getSectionOffset() + in applyRelocations()
720 RelEntry.Offset; in applyRelocations()
722 LLVM_DEBUG(dbgs() << "applyRelocation: " << RelEntry << "\n"); in applyRelocations()
723 auto Value = getProvisionalValue(RelEntry, Layout); in applyRelocations()
725 switch (RelEntry.Type) { in applyRelocations()
1077 for (const WasmRelocationEntry &RelEntry : Relocs) { in writeRelocSection() local
1079 RelEntry.Offset + RelEntry.FixupSection->getSectionOffset(); in writeRelocSection()
1080 uint32_t Index = getRelocationIndexValue(RelEntry); in writeRelocSection()
1082 W->OS << char(RelEntry.Type); in writeRelocSection()
1085 if (RelEntry.hasAddend()) in writeRelocSection()
1086 encodeSLEB128(RelEntry.Addend, W->OS); in writeRelocSection()
1791 for (const WasmRelocationEntry &RelEntry : CodeRelocations) in writeOneObject() local
1792 HandleReloc(RelEntry); in writeOneObject()
1793 for (const WasmRelocationEntry &RelEntry : DataRelocations) in writeOneObject() local
1794 HandleReloc(RelEntry); in writeOneObject()