Although I fixed the DvDWriteNow-BSOD already in
0.4.12-RC-41-g1a9f0bc, I do switch to
the most advanced state of master for the sake of sync (different location of the ld script)
and because Thomas Faber thinks that it's a bit more
safe to just move "after .rsrc" instead of the proper "after .reloc".
A temporary tribute until ROSBE-154 will be fixed properly.
For now we use this just for NTOSKRNL, but not for drivers yet, see
MODULE TYPE sdk/cmake/gcc.cmake
As using also for drivers would immediately lead to BSODs like CORE-16183.
To allow installing DVDWritenow without BSOD,
we need the script at least for ntoskrnl!
The regression was introduced by SVN r55835 == git
6ebf8c253770af0c029f1d7937a33235108d59e3
This patch (after .rsrc) was already committed into 0.4.13RC and 0.4.14RC and
0.4.15-dev-220-g
d28677795e98cdd4fdf0f4aff2773197a6b39718
if(MSVC)
set_image_base(ntoskrnl 0x00400000)
- add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP /SECTION:INIT,D") #Accessed from bugcheck code
+ add_target_link_flags(ntoskrnl "/SECTION:.rsrc,!DP") #Accessed from bugcheck code
+ add_target_link_flags(ntoskrnl "/SECTION:INIT,D")
else()
- add_linker_script(ntoskrnl ntoskrnl_i386.lds)
if(GDB)
set_image_base(ntoskrnl 0x00800000)
else()
set_image_base(ntoskrnl 0x80800000)
endif()
+ add_linker_script(ntoskrnl ${REACTOS_SOURCE_DIR}/sdk/cmake/init-section.lds)
endif()
target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
function(add_linker_script _target _linker_script_file)
get_filename_component(_file_full_path ${_linker_script_file} ABSOLUTE)
add_target_link_flags(${_target} "-Wl,-T,${_file_full_path}")
-
- # Unfortunately LINK_DEPENDS is ignored in non-Makefile generators (for now...)
- # See also http://www.cmake.org/pipermail/cmake/2010-May/037206.html
add_target_property(${_target} LINK_DEPENDS ${_file_full_path})
endfunction()
+/* Make sure the INIT section is at the end of the module so we can reclaim the space */
SECTIONS
{
INIT BLOCK(__section_alignment__) :
__init_end__ = . ;
}
}
-INSERT AFTER .reloc;
\ No newline at end of file
+INSERT AFTER .rsrc;
# add_custom_target("${_target}_${_file_name}" ALL DEPENDS ${_generated_file})
# add_dependencies(${_target} "${_target}_${_file_name}")
add_target_link_flags(${_target} "@${_generated_file}")
-
- # Unfortunately LINK_DEPENDS is ignored in non-Makefile generators (for now...)
- # See also http://www.cmake.org/pipermail/cmake/2010-May/037206.html
- add_target_property(${_target} LINK_DEPENDS ${_generated_file})
+ add_target_property(${_target} LINK_DEPENDS ${_file_full_path})
endif()
endfunction()