make bss and data 16 byte aligned

This commit is contained in:
Mario Hüttel 2021-05-24 03:57:02 +02:00
parent e42b985db3
commit d0fe451276

View File

@ -77,8 +77,8 @@ SECTIONS
{ {
PROVIDE_HIDDEN (__preinit_array_start = .); PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*)) KEEP (*(.preinit_array*))
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_end = .); PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH } >FLASH
.init_array : ALIGN(4) .init_array : ALIGN(4)
@ -86,8 +86,8 @@ SECTIONS
PROVIDE_HIDDEN (__init_array_start = .); PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*))) KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*)) KEEP (*(.init_array*))
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_end = .); PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH } >FLASH
.fini_array : ALIGN(4) .fini_array : ALIGN(4)
@ -95,13 +95,13 @@ SECTIONS
PROVIDE_HIDDEN (__fini_array_start = .); PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(.fini_array*)) KEEP (*(.fini_array*))
KEEP (*(SORT(.fini_array.*))) KEEP (*(SORT(.fini_array.*)))
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_end = .); PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH } >FLASH
/* Initialized Data */ /* Initialized Data */
__ld_load_data = LOADADDR(.data); __ld_load_data = LOADADDR(.data);
.data : ALIGN(4) .data : ALIGN(16)
{ {
__ld_sdata = .; __ld_sdata = .;
*(.data) *(.data)
@ -111,7 +111,7 @@ SECTIONS
} >RAM AT> FLASH } >RAM AT> FLASH
/* Uninitialized static data */ /* Uninitialized static data */
.bss : ALIGN(4) .bss : ALIGN(16)
{ {
__ld_sbss = .; __ld_sbss = .;
*(.bss) *(.bss)
@ -121,7 +121,7 @@ SECTIONS
__ld_ebss = .; __ld_ebss = .;
} >RAM } >RAM
.heap_stack (NOLOAD) : ALIGN(4) .heap_stack (NOLOAD) : ALIGN(16)
{ {
__ld_sheap = .; __ld_sheap = .;
. = . + __ld_heap_size; . = . + __ld_heap_size;