summaryrefslogtreecommitdiff
path: root/src/vm/peimagelayout.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-08-23Deal with compilation warnings in VM in cross-bitness scenario (#18707)Egor Chesakov1-1/+1
2018-05-14PEImageLayout: flush instruction cache only for pages with relocs. (#17773)Konstantin Baladurin1-15/+30
We need to flush instruction cache only for pages that have relocations instead of full sections because otherwise application's shared clean memory is increased in some cases on Linux.
2018-03-30PEImageLayout: clear instruction cache after relocationsKonstantin Baladurin1-0/+22
It fixes crashes on arm when using AOT images.
2018-03-19Fix unloading of images mapped by PAL (#17053)Sven Boemer1-6/+6
* Fix unloading of images mapped by PAL The m_FileView member of MappedImageLayout is a CLRMapViewHolder, which runs CLRUnmapViewOfFile on release. This is fine on Windows, where the MappedImageLayout constructor calls CLRMapViewOfFile. However, with FEATURE_PAL, the constructor calls PAL_LOADLoadPEFile, which simulates LoadLibrary and records multiple mapping entries. Each entry increases the refcount of the underlying file handle PAL object. PAL_LOADUnloadPEFile should be called in this case (instead of CLRUnmapViewOfFile), to decrease the refcount for each mapping entry. Fixes https://github.com/dotnet/coreclr/issues/15189. * Fix build failure
2018-02-28Remove ConvertILOnlyPE32ToPE64 and ConvertILOnlyPE32ToPE64Worker (#16676)Egor Chesakov1-110/+0
2018-02-11Delete PEFingerPrint.* (#16325)Jan Kotas1-18/+0
Unnecessary dummy type on CoreCLR
2017-10-09Fix zap and ready to run disabling (#14389)Jan Vorlicek1-2/+2
* Fix zap and ready to run disabling While the COMPlus_ZapDisable and COMPlus_ReadyToRun config settings can be used to disable using crossgened / ready to run images, loading IL from such images fails. This change foxes that. * Reflect PR feedback Remove ReadyToRunInfo::IsReadyToRunEnabled from Module::Initialize again and move the same check in the ReadyToRunInfo::Initialize before we start checking the PE file properties.
2017-09-14Fix crossgen memory mappings (#13972)Jan Vorlicek1-2/+10
This change removes executable memory mappings from crossgen. Now it can be run on systems with PAX set to prevent executable mappings without any marking using the paxctl.
2017-06-12[Arm64/Unix] Add 64K page support (#10981)Steve MacLean1-3/+3
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
2017-04-26Fix filename display in exception messages (#11238)Gaurav Khanna1-1/+12
2017-04-24Remove PAL FileAlignment restriction (#10959)Steve MacLean1-12/+14
* Remove PAL FileAlignment restriction * Address PR #10959 feedback * Fix amd64 crossgen error * Respond to review feedback * Fix arm32 regression * Prepare to remove VIRTUAL_PAGE_* from map.cpp Also simplify previous section code * Rename function to GetVirtualPageSize()
2017-02-14Remove never defined FEATURE_MIXEDMODEdanmosemsft1-28/+0
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft1-52/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-94/+0
2016-06-07Fix for issue 3146: dotnet build is slower on Linux than Windows (#5524)Fadi Hanna1-13/+20
Fixing the loader logic on Unix to mimic the behavior on Windows, in order to be able to successfully load and use R2R images on Unix where the file extension does not have the ".ni." portion.
2016-04-23Fix loading of NI images on SELinuxJan Vorlicek1-1/+47
This change fixes a problem that prevents us to load crossgen-ed managed assemblies on SELinux when running in confined mode. The problem was that when we load these images, we also apply relocations to their sections and so we temporarily switch section protection from RX to RW and then back. And the switching back (RW -> RX) is something that SELinux doesn't allow. The fix is to switch to RWX before applying to relocations for sections that are RX, since it is allowed then to switch them back to RX. One more change was needed to get the original protection of the section before relocation so that we can set it back later. The PE files are not mapped using VirtualXXXX functions in the PAL and so VirtualProtect doesn't return the proper original protection, but a fixed value instead. So for PAL, we derive the original protection from the section attributes.
2016-03-09Delete dead codeJan Kotas1-24/+0
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
2016-02-19This Change Adds initial Support for LongFiles in the VM,Rama Krishnan Raghupathy1-3/+3
They are: 1. Wrappers for OS APIs which take or return PATHS 2. Fixing the usage of following Api's: GetEnvironmentVariableW SearchPathW GetShortPathNameW GetLongPathNameW GetModuleFileName Work remaining: Remove fixed size buffers in the VM
2016-02-01Fix ReadyToRun on UnixJan Vorlicek1-13/+3
While making the ready to run tests run on Unix, I have discovered that the feature doesn't really work on Unix. First, I have found that the test was generating the native images into the NI subfolder, but the corerun on Unix doesn't use this notation and expects these images to live side by side with the IL executables. So, the test to verify that an image cannot be loaded multiple times was failing, since the main exe loaded the IL test.dll instead of the native one and so explicit load of the native test.dll wasn't considered a secondary load of the same image. After fixing the test, I have found that attempt to load a ready to run image is failing with an assert. There were these issues: - the loaded native image was not marked as relocated - the EPILOG_WITH_TRANSITION_BLOCK_RETURN macro was missing popping argument registers - One of the asserts and one getter didn't take into account the fact that the ready to run native image is not considered to have native header. - The assembler helpers DelayLoad_Helper and DelayLoad_MethodCall were passing a hex number as a parameter to the PROLOG_WITH_TRANSITION_BLOCK, but it was using the "h" suffix notation. There is a known issue in the clang assembler which causes such suffix to be swallowed so the macro was getting just "10" instead of "10h". The fix was to use 0x prefix instead. This change fixes the problem. The ready to run tests pass with it correctly.
2016-01-27Update license headersdotnet-bot1-4/+3
2015-08-25Replace MAX_PATH with new defines in vm.Lakshmi Priya Sekar1-3/+3
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+855
[tfs-changeset: 1407945]