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;
750 WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) {
751 if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) {
752 if (!TypeIndices.count(RelEntry.Symbol))
754 RelEntry.Symbol->getName());
755 return TypeIndices[RelEntry.Symbol];
758 return RelEntry.Symbol->getIndex();
767 for (const WasmRelocationEntry &RelEntry : Relocations) {
769 RelEntry.FixupSection->getSectionOffset() +
770 RelEntry.Offset;
772 LLVM_DEBUG(dbgs() << "applyRelocation: " << RelEntry << "\n");
773 uint64_t Value = getProvisionalValue(Asm, RelEntry);
775 switch (RelEntry.Type) {
1131 for (const WasmRelocationEntry &RelEntry : Relocs) {
1133 RelEntry.Offset + RelEntry.FixupSection->getSectionOffset();
1134 uint32_t Index = getRelocationIndexValue(RelEntry);
1136 W->OS << char(RelEntry.Type);
1139 if (RelEntry.hasAddend())
1140 encodeSLEB128(RelEntry.Addend, W->OS);
1854 for (const WasmRelocationEntry &RelEntry : CodeRelocations)
1855 HandleReloc(RelEntry);
1856 for (const WasmRelocationEntry &RelEntry : DataRelocations)
1857 HandleReloc(RelEntry);