Skip to content

[question] crossgen2 generates misaligned relocations #96066

Open

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-crossgen2-coreclrquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions