Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
do not convert non-file layouts on OSX
  • Loading branch information
VSadov authored and github-actions committed Aug 20, 2022
commit 7b5aa65c0f9a3aacb0738df748496eccca052cce
11 changes: 11 additions & 0 deletions src/coreclr/vm/peimagelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ PEImageLayout* PEImageLayout::LoadConverted(PEImage* pOwner)
return pFlat.Extract();
}

#ifdef TARGET_OSX
// We need to allocate executable memory on OSX in order to do relocation of R2R code.
// Converted layout currently uses VirtualAlloc, so it will not work.
// Do not convert byte array images on OSX for now (that will disable R2R)
// TODO: consider relaxing this in the future.
if (!pOwner->IsFile())
{
return pFlat.Extract();
}
#endif

return new ConvertedImageLayout(pFlat);
}

Expand Down