From 5c21460680f4a5308e935a166a27e3de2622033c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 18 Mar 2021 09:48:22 +0100 Subject: [PATCH] [CMAKE] Put .rsrc section after the INIT section on drivers, like link.exe does --- sdk/cmake/init-section.lds | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk/cmake/init-section.lds b/sdk/cmake/init-section.lds index eeda07bf3ce..a40433ae91b 100644 --- a/sdk/cmake/init-section.lds +++ b/sdk/cmake/init-section.lds @@ -1,4 +1,4 @@ -/* Make sure the INIT section is at the end of the module so we can reclaim the space */ +/* Make sure the INIT & .rsrc sections are at the end of the module so we can reclaim the space */ SECTIONS { INIT BLOCK(__section_alignment__) : @@ -7,5 +7,11 @@ SECTIONS *(INIT) __init_end__ = . ; } + .rsrc BLOCK(__section_alignment__) : + { + __rsrc_start__ = . ; + *(.rsrc) + __rsrc_end__ = . ; + } } INSERT BEFORE .reloc; /* .reloc is always at the end */