[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.
This commit is contained in:
Dmitry Borisov 2021-04-08 19:43:30 +06:00 committed by Hermès Bélusca-Maïto
parent 6e33c8ffd3
commit 0fb3c1e91e
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 16 additions and 0 deletions

View file

@ -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)