[CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683
[reactos.git] / sdk / cmake / gcc.cmake
index f5c1ec1..c4c741f 100644 (file)
@@ -318,6 +318,7 @@ function(set_module_type_toolchain MODULE TYPE)
         if(${TYPE} STREQUAL "wdmdriver")
             add_target_link_flags(${MODULE} "-Wl,--wdmdriver")
         endif()
+        add_linker_script(${MODULE} ${REACTOS_SOURCE_DIR}/sdk/cmake/init-section.lds)
     endif()
     
     if(STACK_PROTECTOR)