https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0fb3c1e91e6b21bbdf51d…
commit 0fb3c1e91e6b21bbdf51d0fc604bff680e7fabd8
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Thu Apr 8 19:43:30 2021 +0600
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon May 10 00:36:38 2021 +0200
[PCIIDE] Make the resource section not discardable. CORE-17401 (#3594)
[PCIX] Make the resource section not discardable.
These drivers need to be able to access their message resources at any time.
---
drivers/bus/pcix/CMakeLists.txt | 8 ++++++++
drivers/storage/ide/pciide/CMakeLists.txt | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/bus/pcix/CMakeLists.txt b/drivers/bus/pcix/CMakeLists.txt
index 4a27ae9c084..839d49e73dd 100644
--- a/drivers/bus/pcix/CMakeLists.txt
+++ b/drivers/bus/pcix/CMakeLists.txt
@@ -48,6 +48,14 @@ add_library(pcix MODULE
set_module_type(pcix kernelmodedriver)
target_link_libraries(pcix arbiter)
+if(MSVC)
+ target_link_options(pcix PRIVATE /SECTION:.rsrc,!D)
+else()
+ add_custom_command(
+ TARGET pcix POST_BUILD
+ COMMAND native-pefixup --section:.rsrc,!D $<TARGET_FILE:pcix>
+ VERBATIM)
+endif()
add_importlibs(pcix ntoskrnl hal)
add_pch(pcix pci.h "${PCH_SKIP_SOURCE}")
add_dependencies(pcix pciclass)
diff --git a/drivers/storage/ide/pciide/CMakeLists.txt
b/drivers/storage/ide/pciide/CMakeLists.txt
index a0eab2c2069..863f37cca6f 100644
--- a/drivers/storage/ide/pciide/CMakeLists.txt
+++ b/drivers/storage/ide/pciide/CMakeLists.txt
@@ -1,5 +1,13 @@
add_library(pciide MODULE pciide.c pciide.rc)
set_module_type(pciide kernelmodedriver)
+if(MSVC)
+ target_link_options(pciide PRIVATE /SECTION:.rsrc,!D)
+else()
+ add_custom_command(
+ TARGET pciide POST_BUILD
+ COMMAND native-pefixup --section:.rsrc,!D $<TARGET_FILE:pciide>
+ VERBATIM)
+endif()
add_importlibs(pciide pciidex ntoskrnl)
add_cd_file(TARGET pciide DESTINATION reactos/system32/drivers NO_CAB FOR all)