Description
Crossgen2 constructs some code by ObjectDataBuilder
class. In some cases the code includes pieces of data, for example relocation pointers. To proper align the data ObjectDataBuilder
has method PadAlignment
:
https://github.com/dotnet/runtime/blob/486142a4b87ed6e3134bd1a8726156fb3f55157a/src/coreclr/tools/Common/Compiler/DependencyAnalysis/ObjectDataBuilder.cs#L357C44-L357C44
At the same time the only platform which use PadAlignment
method is Win32.
Why crossgen2 uses PadAlignment
only for Win32 and generates misaligned data for other platforms?
On platforms there misaligned memory operations is not prohibited they may cause performance degradation in compare with aligned operations. Is there some memory/performance investigations for this misaligned/aligned data generation?