Skip to content

JIT: Avoid unnecessary extra sections for crossgen producing PE outside Windows #125268

Description

@jakobbotsch

crossgen2 still produces PE outside Windows in some cases. It means this condition is not accurate:

bool Compiler::eeDataWithCodePointersNeedsRelocs()
{
#if defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// On these platforms, for ELF/MachO, we allocate this data in read-write
// data and need to report relocations to the EE. Otherwise we allocate
// next to the code chunk and hence do not need to report any relocs.
return opts.compReloc && !TargetOS::IsWindows;
#else
// Other targets allocate code and data separately and always needs relocs.
return opts.compReloc;
#endif
}

See also https://github.com/dotnet/runtime/pull/124203/changes#r2875455844

Activity

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

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIruntime-async

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions