[CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683
authorThomas Faber <thomas.faber@reactos.org>
Sat, 29 Jun 2019 17:24:28 +0000 (19:24 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 7 Jul 2019 06:18:10 +0000 (08:18 +0200)
commitc4d8e2a6e9660c1f0d0d24877219baca443bbce0
treef9d6dec5fa36d592fe60b32b1159590e6b51fae3
parentc17a8770a31ab3c9fbbc2a96bae6d55c057bd8b9
[CMAKE] Ensure the INIT section is placed at the end of a module. CORE-14683

For MSVC, marking the section as discardable will do this automatically.
For GCC, we use a linker script that places it after the .reloc section
(which should be the last "real" section, check ld --verbose output for the
default linker script).

This fixes what seems to be a regression from r55835 (!).
ntoskrnl/CMakeLists.txt
sdk/cmake/gcc.cmake
sdk/cmake/init-section.lds [new file with mode: 0644]
sdk/cmake/msvc.cmake