[0.4.9][NTOSKRNL] Restore section layout for NTOSKRNL to fix BSOD regression CORE-14683

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
6ebf8c2537

This patch (after .rsrc) was already committed into 0.4.15-dev-220-g
d28677795e
This commit is contained in:
Joachim Henze 2020-10-31 16:39:40 +01:00
parent 6d872b3e7e
commit fcd06d286b
4 changed files with 91 additions and 0 deletions

View file

@ -458,3 +458,9 @@ endfunction()
macro(add_asm_files _target)
list(APPEND ${_target} ${ARGN})
endmacro()
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}")
add_target_property(${_target} LINK_DEPENDS ${_file_full_path})
endfunction()