[PEFIXUP] Fixup of resource sections in GCC builds. (#3594)

Make resource sections discardable for kernel-mode drivers and DLLs.
This commit is contained in:
Dmitry Borisov 2021-04-08 20:50:51 +06:00 committed by Hermès Bélusca-Maïto
parent 0fe7fdbdea
commit 6e33c8ffd3
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 12 additions and 6 deletions

View file

@ -307,7 +307,7 @@ function(set_module_type_toolchain MODULE TYPE)
# Fixup section characteristics
# - Remove flags that LD overzealously puts (alignment flag, Initialized flags for code sections)
# - INIT section is made discardable
# - .rsrc is made read-only
# - .rsrc is made read-only and discardable
# - PAGE & .edata sections are made pageable.
add_custom_command(TARGET ${MODULE} POST_BUILD
COMMAND native-pefixup --${TYPE} $<TARGET_FILE:${MODULE}>)