Sort .text section to reduce fill
This commit is contained in:
parent
ec067ae728
commit
cd5acae4f4
@ -27,8 +27,12 @@ SECTIONS
|
||||
. = ALIGN(4);
|
||||
_sfixed = .;
|
||||
KEEP(*(.vectors)) /* isr vector table */
|
||||
*(.text) /* .text sections (code) */
|
||||
*(.text*) /* .text* sections (code) */
|
||||
|
||||
/* Sort text sections so that they have fewer *fill* bytes needed. */
|
||||
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.text)) /* .text sections (code) */
|
||||
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) /* .text* sections (code) */
|
||||
|
||||
/* Don't sort rodata because it impacts codegen size. */
|
||||
*(.rodata) /* .rodata sections (constants, strings, etc.) */
|
||||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
|
||||
|
||||
@ -62,8 +66,8 @@ SECTIONS
|
||||
_srelocate = .; /* create a global symbol at data start; used by startup code in order to initialize the .data section in RAM */
|
||||
*(.ramfunc)
|
||||
*(.ramfunc*)
|
||||
*(.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);
|
||||
_erelocate = .; /* define a global symbol at data end; used by startup code in order to initialize the .data section in RAM */
|
||||
@ -76,7 +80,7 @@ SECTIONS
|
||||
_sbss = .;
|
||||
_szero = .; /* define a global symbol at bss start; used by startup code */
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*SORT_BY_ALIGNMENT(SORT_BY_NAME(.bss*))
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user