Sort .text section to reduce fill on nRF

This commit is contained in:
Scott Shawcroft 2021-08-31 19:33:44 -07:00
parent cd5acae4f4
commit 0cffa6be81
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA

View File

@ -62,8 +62,8 @@ SECTIONS
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
/* *(.glue_7) */ /* glue arm to thumb code */
@ -85,8 +85,8 @@ SECTIONS
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
_ram_start = .; /* create a global symbol at ram start for garbage collector */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.data)) /* .data sections */
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.data*)) /* .data* sections */
. = ALIGN(4);
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
@ -97,8 +97,8 @@ SECTIONS
{
. = ALIGN(4);
_sbss = .; /* define a global symbol at bss start; used by startup code */
*(.bss)
*(.bss*)
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss))
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))
*(COMMON)
. = ALIGN(4);