From: Stefan Ginsberg Date: Thu, 3 Sep 2015 09:29:26 +0000 (+0000) Subject: - Explicitly make the kernel .rsrc/Resource Directory non-discardable and non-pageabl... X-Git-Tag: ReactOS-0.4.0~1095 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=349dd3bfe464aca766b133444f709dd6a0330e15 - Explicitly make the kernel .rsrc/Resource Directory non-discardable and non-pageable on MSVC builds, as it is accessed from bugcheck code. Previously this data was marked as discardable and the bugcheck routine would bugcheck (after a certain stage in boot) when trying to access the bugcheck code data because the data was discarded and the memory invalidated. Thanks to Thomas for the help and the fix. svn path=/trunk/; revision=68930 --- diff --git a/reactos/ntoskrnl/CMakeLists.txt b/reactos/ntoskrnl/CMakeLists.txt index c2ba5f202c7..b21b53f41d1 100644 --- a/reactos/ntoskrnl/CMakeLists.txt +++ b/reactos/ntoskrnl/CMakeLists.txt @@ -28,6 +28,7 @@ set_subsystem(ntoskrnl native) if(MSVC) set_image_base(ntoskrnl 0x00400000) + add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code else() if(GDB) set_image_base(ntoskrnl 0x00800000) diff --git a/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt b/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt index 4f64c66e6dd..a7cf46a0123 100644 --- a/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt +++ b/reactos/ntoskrnl/ntkrnlmp/CMakeLists.txt @@ -28,6 +28,7 @@ set_subsystem(ntkrnlmp native) if(MSVC) set_image_base(ntkrnlmp 0x00400000) + add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code else() set_image_base(ntkrnlmp 0x80800000) endif()