reactos/sdk/cmake/init-section.lds
Thomas Faber c4d8e2a6e9
[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 (!).
2019-07-07 08:18:10 +02:00

12 lines
229 B
Plaintext

/* Make sure the INIT section is at the end of the module so we can reclaim the space */
SECTIONS
{
INIT BLOCK(__section_alignment__) :
{
__init_start__ = . ;
*(INIT)
__init_end__ = . ;
}
}
INSERT AFTER .reloc;