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 $ + 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 $ + VERBATIM) +endif() add_importlibs(pciide pciidex ntoskrnl) add_cd_file(TARGET pciide DESTINATION reactos/system32/drivers NO_CAB FOR all)