Lines Matching defs:RelEntry
352 const WasmRelocationEntry &RelEntry);
356 uint32_t getRelocationIndexValue(const WasmRelocationEntry &RelEntry);
635 // by RelEntry. This value isn't used by the static linker; it just serves
640 const WasmRelocationEntry &RelEntry) {
641 if ((RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_LEB ||
642 RelEntry.Type == wasm::R_WASM_GLOBAL_INDEX_I32) &&
643 !RelEntry.Symbol->isGlobal()) {
644 assert(GOTIndices.count(RelEntry.Symbol) > 0 && "symbol not found in GOT index space");
645 return GOTIndices[RelEntry.Symbol];
648 switch (RelEntry.Type) {
657 cast<MCSymbolWasm>(Asm.getBaseSymbol(*RelEntry.Symbol));
659 if (RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB ||
660 RelEntry.Type == wasm::R_WASM_TABLE_INDEX_REL_SLEB64)
667 return getRelocationIndexValue(RelEntry);
675 assert(WasmIndices.count(RelEntry.Symbol) > 0 && "symbol not found in wasm index space");
676 return WasmIndices[RelEntry.Symbol];
680 if (!RelEntry.Symbol->isDefined())
683 static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection());
684 return Section.getSectionOffset() + RelEntry.Addend;
699 if (!RelEntry.Symbol->isDefined())
701 const wasm::WasmDataReference &SymRef = DataLocations[RelEntry.Symbol];
704 return Segment.Offset + SymRef.Offset + RelEntry.Addend;
747 WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) {
748 if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) {
749 auto It = TypeIndices.find(RelEntry.Symbol);
752 RelEntry.Symbol->getName());
756 return RelEntry.Symbol->getIndex();
765 for (const WasmRelocationEntry &RelEntry : Relocations) {
767 RelEntry.FixupSection->getSectionOffset() +
768 RelEntry.Offset;
770 LLVM_DEBUG(dbgs() << "applyRelocation: " << RelEntry << "\n");
771 uint64_t Value = getProvisionalValue(Asm, RelEntry);
773 switch (RelEntry.Type) {
1129 for (const WasmRelocationEntry &RelEntry : Relocs) {
1131 RelEntry.Offset + RelEntry.FixupSection->getSectionOffset();
1132 uint32_t Index = getRelocationIndexValue(RelEntry);
1134 W->OS << char(RelEntry.Type);
1137 if (RelEntry.hasAddend())
1138 encodeSLEB128(RelEntry.Addend, W->OS);
1852 for (const WasmRelocationEntry &RelEntry : CodeRelocations)
1853 HandleReloc(RelEntry);
1854 for (const WasmRelocationEntry &RelEntry : DataRelocations)
1855 HandleReloc(RelEntry);