5 instantiations of Relocation
ILCompiler.ReadyToRun (5)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\ObjectDataBuilder.cs (1)
265_relocs.Add(new Relocation(relocType, _data.Count, symbol));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (3)
301buffer[i] = new Relocation(r.RelocType, r.Offset + offset, r.Target); 371buffer[0] = new Relocation(_relocType, 0, _symbol); 481buffer[0] = new Relocation(RelocType.WASM_TYPE_INDEX_LEB, base.EncodeSize(), _type);
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
4340sourceBlock.Add(new Relocation(relocType, relocOffset, relocTarget));
138 references to Relocation
ILCompiler.ReadyToRun (138)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (2)
304return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this }); 310return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\CopiedFieldRvaNode.cs (1)
46relocs: Array.Empty<Relocation>(),
Compiler\DependencyAnalysis\ReadyToRun\CopiedManagedResourcesNode.cs (1)
50relocs: Array.Empty<Relocation>(),
Compiler\DependencyAnalysis\ReadyToRun\CopiedMethodILNode.cs (3)
53relocs: Array.Empty<Relocation>(), 63return new ObjectData(s_minimalILBody, Array.Empty<Relocation>(), 4, new ISymbolDefinitionNode[] { this }); 72return new ObjectData(bodyBytes, Array.Empty<Relocation>(), 4, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\CopiedStrongNameSignatureNode.cs (1)
53relocs: Array.Empty<Relocation>(),
Compiler\DependencyAnalysis\ReadyToRun\DebugDirectoryEntryNode.cs (2)
305return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this }); 317return new ObjectData(result, Array.Empty<Relocation>(), _module.Context.Target.PointerSize, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\DebugInfoTableNode.cs (1)
76return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\EnclosingTypeMapNode.cs (1)
46return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\ExceptionInfoLookupTableNode.cs (2)
51return new ObjectData(_ehInfoBuilder.ToArray(), Array.Empty<Relocation>(), alignment: 4, definedSymbols: new ISymbolDefinitionNode[] { this }); 110return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\GCRefMapNode.cs (1)
59relocs: Array.Empty<Relocation>(),
Compiler\DependencyAnalysis\ReadyToRun\HotColdMapNode.cs (1)
37return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\InliningInfoNode.cs (1)
61return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\InstanceEntryPointTableNode.cs (1)
94return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, Array.Empty<ISymbolDefinitionNode>());
Compiler\DependencyAnalysis\ReadyToRun\InstrumentationDataTableNode.cs (1)
239return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, Array.Empty<ISymbolDefinitionNode>());
Compiler\DependencyAnalysis\ReadyToRun\ManifestAssemblyMvidHeaderNode.cs (1)
59return new ObjectData(manifestAssemblyMvidTable, Array.Empty<Relocation>(), alignment: 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\ManifestMetadataTableNode.cs (1)
315relocs: Array.Empty<Relocation>(),
Compiler\DependencyAnalysis\ReadyToRun\MethodEntryPointTableNode.cs (1)
46return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, Array.Empty<ISymbolDefinitionNode>());
Compiler\DependencyAnalysis\ReadyToRun\MethodIsGenericMapNode.cs (1)
36return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\MethodWithGCInfo.cs (3)
142Relocation[] relocations = GetData(factory, relocsOnly: true).Relocs; 146Relocation[] coldRelocations = ColdCodeNode.GetData(factory, relocsOnly: true).Relocs; 164foreach (Relocation reloc in relocations)
Compiler\DependencyAnalysis\ReadyToRun\RuntimeFunctionsTableNode.cs (1)
67return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\TypeGenericInfoMapNode.cs (1)
39return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
Compiler\DependencyAnalysis\ReadyToRun\TypesTableNode.cs (1)
31return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, new ISymbolDefinitionNode[] { this });
JitInterface\CorInfoImpl.ReadyToRun.cs (1)
1622return new ObjectNode.ObjectData(ehInfoData, Array.Empty<Relocation>(), alignment: 1, definedSymbols: Array.Empty<ISymbolDefinitionNode>());
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\ObjectDataBuilder.cs (2)
28_relocs = default(ArrayBuilder<Relocation>); 38private ArrayBuilder<Relocation> _relocs;
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\ObjectNode.cs (4)
15public ObjectData(byte[] data, Relocation[] relocs, int alignment, ISymbolDefinitionNode[] definedSymbols) 23public readonly Relocation[] Relocs; 59Relocation[] relocs = GetData(factory, true).Relocs; 65foreach (Relocation reloc in relocs)
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Target_Wasm\WasmEmitter.cs (2)
31Relocation[] relocs = new Relocation[FunctionBody.EncodeRelocationCount()];
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\WasmTypeNode.cs (2)
44relocs: Array.Empty<Relocation>(), 54relocs: Array.Empty<Relocation>(),
src\runtime\src\coreclr\tools\Common\Compiler\ExternalTypeMapObjectNode.cs (2)
30return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, [this]); 45return new ObjectData(hashTableBytes, Array.Empty<Relocation>(), 1, [this]);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\CoffObjectWriter.cs (2)
204long inlineValue = Relocation.ReadValue(relocType, (void*)pData); 205Relocation.WriteValue(relocType, (void*)pData, inlineValue + addend);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (6)
214long inlineValue = Relocation.ReadValue(relocType, (void*)pData); 218Relocation.WriteValue(relocType, (void*)pData, 0); 225long inlineValue = Relocation.ReadValue(relocType, (void*)pData); 233Relocation.WriteValue(relocType, (void*)pData, addend); 237long inlineValue = Relocation.ReadValue(relocType, (void*)pData); 238Relocation.WriteValue(relocType, (void*)pData, inlineValue + addend);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (4)
473addend += Relocation.ReadValue(relocType, pData); 474Relocation.WriteValue(relocType, pData, 0); 509long inlineValue = Relocation.ReadValue(relocType, (void*)pData); 510Relocation.WriteValue(relocType, (void*)pData, inlineValue + addend);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (12)
29private sealed record BlockToRelocate(int SectionIndex, long Offset, byte[] Data, Relocation[] Relocations); 30private protected sealed record ChecksumsToCalculate(int SectionIndex, long Offset, Relocation[] ChecksumRelocations); 195adjustedAddend += Relocation.ReadValue(relocType, (void*)pData); 198if (relocType is IMAGE_REL_BASED_THUMB_BRANCH24 && !Relocation.FitsInThumb2BlRel24((int)adjustedAddend)) 204Relocation.WriteValue(relocType, (void*)pData, adjustedAddend); 213Relocation.WriteValue(relocType, (void*)pData, definedSymbol.Size); 483foreach (Relocation reloc in nodeContents.Relocs) 509foreach (Relocation reloc in nodeContents.Relocs) 511RelocType fileReloc = Relocation.GetFileRelocationType(reloc.RelocType); 559ArrayBuilder<Relocation> checksumRelocationsBuilder = default; 560foreach (Relocation reloc in blockToRelocate.Relocations) 685foreach (var reloc in block.ChecksumRelocations)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\PEObjectWriter.cs (14)
573if (Relocation.GetFileRelocationType(reloc.Type) == reloc.Type) 890uint relocLength = (uint)Relocation.GetSize(reloc.Type); 895long addend = Relocation.ReadValue(reloc.Type, pData); 906Relocation.WriteValue(reloc.Type, pData, symbolImageOffset + imageBase + addend); 909Relocation.WriteValue(reloc.Type, pData, symbolImageOffset + addend); 913Relocation.WriteValue(reloc.Type, pData, symbolImageOffset - (relocOffset + relocLength) + addend); 917Relocation.WriteValue(reloc.Type, pData, fileOffset + addend); 921Relocation.WriteValue(reloc.Type, pData, symbolImageOffset - (relocOffset + offsetCorrection) + addend); 928Relocation.WriteValue(reloc.Type, pData, delta); 933Relocation.WriteValue(reloc.Type, pData, (symbolImageOffset + addend) & 0xfff); 939Relocation.WriteValue(reloc.Type, pData, delta); 949Relocation.WriteValue(reloc.Type, pData, delta); 961Span<byte> data = new byte[Relocation.GetSize(reloc.Type)]; 969stream.Write(new Span<byte>(data, Relocation.GetSize(reloc.Type)));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmInstructions.cs (14)
109public int EncodeRelocations(Span<Relocation> buffer) 250public int EncodeRelocations(Span<Relocation> buffer) 290public virtual int EncodeRelocations(Span<Relocation> buffer) 296public static void OffsetRelocationsByOffset(Span<Relocation> buffer, int offset) 300Relocation r = buffer[i]; 322public int EncodeRelocations(Span<Relocation> buffer) => 0; 338return Relocation.GetSize(_relocType); 344int relocSize = Relocation.GetSize(_relocType); 369public int EncodeRelocations(Span<Relocation> buffer) 410public override int EncodeRelocations(Span<Relocation> buffer) 464return base.EncodeSize() + Relocation.GetSize(RelocType.WASM_TYPE_INDEX_LEB) + (int)tableSize; 470int relocSize = Relocation.GetSize(RelocType.WASM_TYPE_INDEX_LEB); 479public override int EncodeRelocations(Span<Relocation> buffer) 503public override int EncodeRelocations(Span<Relocation> buffer)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmNative.cs (7)
19int EncodeRelocations(Span<Relocation> buffer); 62public abstract int EncodeRelocations(Span<Relocation> buffer); 95public override int EncodeRelocations(Span<Relocation> buffer) => 0; 115public override int EncodeRelocations(Span<Relocation> buffer) => 0; 165public override int EncodeRelocations(Span<Relocation> buffer) => 0; 187public int EncodeRelocations(Span<Relocation> buffer) => Import.EncodeRelocations(buffer); 215public int EncodeRelocations(Span<Relocation> buffer) => 0;
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmObjectWriter.cs (24)
779RelocType fileRelocType = Relocation.GetFileRelocationType(reloc.Type); 829byte[] relocScratchBuffer = new byte[Relocation.MaxSize]; 846int size = Relocation.GetSize(reloc.Type); 879long addend = Relocation.ReadValue(reloc.Type, pData); 880int relocLength = Relocation.GetSize(reloc.Type); 888Relocation.WriteValue(reloc.Type, pData, index); 910Relocation.WriteValue(reloc.Type, pData, virtualSymbolImageOffset + 0 + addend); 914Relocation.WriteValue(reloc.Type, pData, virtualSymbolImageOffset + addend); 919Relocation.WriteValue(reloc.Type, pData, virtualSymbolImageOffset - (virtualRelocOffset + relocLength) + addend); 925Relocation.WriteValue(reloc.Type, pData, fileOffset + addend); 942Relocation.WriteValue(reloc.Type, pData, virtualSymbolImageOffset + addend); 958Relocation.WriteValue(reloc.Type, pData, virtualSymbolImageOffset + addend); 972Relocation.WriteValue(reloc.Type, pData, index); 982Relocation.WriteValue(reloc.Type, pData, index); 997Span<byte> relocContents = buffer.AsSpan(0, Relocation.GetSize(reloc.Type)); 1006sectionStream.Write(new Span<byte>(pData, Relocation.GetSize(reloc.Type))); 1240uint encodeLength = Relocation.WASM_PADDED_RELOC_SIZE_32; 1244Debug.Assert(headerBuffer.Slice(1).Length == Relocation.WASM_PADDED_RELOC_SIZE_32); 1251public override int HeaderSize => 1 + Relocation.WASM_PADDED_RELOC_SIZE_32; 1331Relocation.WASM_PADDED_RELOC_SIZE_32, // encode size of data length 1334Relocation.WASM_PADDED_RELOC_SIZE_32, // encode size of data length 1374Debug.Assert(headerBuffer.Slice(len).Length == Relocation.WASM_PADDED_RELOC_SIZE_32); 1383Debug.Assert(headerBuffer.Slice(len).Length == Relocation.WASM_PADDED_RELOC_SIZE_32, $"{headerBuffer.Slice(len).Length} != {Relocation.WASM_PADDED_RELOC_SIZE_32}");
src\runtime\src\coreclr\tools\Common\Compiler\ProxyTypeMapObjectNode.cs (2)
31return new ObjectData(Array.Empty<byte>(), Array.Empty<Relocation>(), 1, [this]); 47return new ObjectData(hashTableBytes, Array.Empty<Relocation>(), 1, [this]);
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (11)
683_codeRelocs = default(ArrayBuilder<Relocation>); 684_roDataRelocs = default(ArrayBuilder<Relocation>); 685_rwDataRelocs = default(ArrayBuilder<Relocation>); 687_coldCodeRelocs = default(ArrayBuilder<Relocation>); 4129private ArrayBuilder<Relocation> _codeRelocs; 4130private ArrayBuilder<Relocation> _roDataRelocs; 4131private ArrayBuilder<Relocation> _rwDataRelocs; 4133private ArrayBuilder<Relocation> _coldCodeRelocs; 4216private ref ArrayBuilder<Relocation> findRelocBlock(BlockType blockType, out int length) 4282ref ArrayBuilder<Relocation> sourceBlock = ref findRelocBlock(locationBlock, out length); 4336Relocation.WriteValue(relocType, location, relocDelta);