Skip to content

Freescale/NXP: Fix alignment of execute region to 8byte boundary #8186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ SECTIONS
KEEP(*(.vector_table))
*(.text.Reset_Handler)
*(.text.System_Init)
. = ALIGN(4);
. = ALIGN(8);
} > VECTORS

.flash_protect :
{
KEEP(*(.kinetis_flash_config_field))
. = ALIGN(4);
. = ALIGN(8);
} > FLASH_PROTECTION

.text :
Expand Down Expand Up @@ -101,28 +101,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ SECTIONS
KEEP(*(.isr_vector))
*(.text.Reset_Handler)
*(.text.SystemInit)
. = ALIGN(4);
. = ALIGN(8);
} > VECTORS

.flash_protect :
{
KEEP(*(.kinetis_flash_config_field))
. = ALIGN(4);
. = ALIGN(8);
} > FLASH_PROTECTION

.text :
Expand Down Expand Up @@ -102,28 +102,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SECTIONS
{
__vector_table = .;
KEEP(*(.vector_table))
. = ALIGN(4);
. = ALIGN(8);
} > VECTORS

.text :
Expand Down Expand Up @@ -92,28 +92,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ SECTIONS
KEEP(*(.vector_table))
*(.text.Reset_Handler)
*(.text.System_Init)
. = ALIGN(4);
. = ALIGN(8);
} > VECTORS

.flash_protect :
{
KEEP(*(.kinetis_flash_config_field))
. = ALIGN(4);
. = ALIGN(8);
} > FLASH_PROTECTION

.text :
Expand Down Expand Up @@ -101,28 +101,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ SECTIONS
.interrupts :
{
__vector_table = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.vectortable)) /* Startup code */
. = ALIGN(4);
. = ALIGN(8);
} > m_interrupts

.cfmprotect :
{
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.cfmconfig)) /* Flash Configuration Field (FCF) */
. = ALIGN(4);
. = ALIGN(8);
} > m_cfmprotrom

/* The program code and other data goes into Flash */
.text :
{
. = ALIGN(4);
. = ALIGN(8);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
Expand All @@ -62,7 +62,7 @@ SECTIONS
KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
. = ALIGN(8);
_etext = .; /* define a global symbols at end of code */
} > m_text

Expand Down Expand Up @@ -141,20 +141,20 @@ SECTIONS
/* Initialized data sections goes into RAM, load LMA copy after code */
.data : AT(___ROM_AT)
{
. = ALIGN(4);
. = ALIGN(8);
__sinit__ = .;
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(4);
. = ALIGN(8);
_edata = .; /* define a global symbol at data end */
} > m_data

___data_size = _edata - _sdata;

/* Uninitialized data section */
. = ALIGN(4);
. = ALIGN(8);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
Expand All @@ -164,7 +164,7 @@ SECTIONS
*(.bss*)
*(COMMON)

. = ALIGN(4);
. = ALIGN(8);
__END_BSS = .;
PROVIDE ( __bss_end__ = __END_BSS );
} > m_data
Expand All @@ -184,13 +184,13 @@ SECTIONS
/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(4);
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
__heap_addr = .;
. = . + __heap_size;
. = . + __stack_size;
. = ALIGN(4);
. = ALIGN(8);
} > m_data

.ARM.attributes 0 : { *(.ARM.attributes) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ SECTIONS
KEEP(*(.vector_table))
*(.text.Reset_Handler)
*(.text.System_Init)
. = ALIGN(4);
. = ALIGN(8);
} > VECTORS

.flash_protect :
{
KEEP(*(.kinetis_flash_config_field))
. = ALIGN(4);
. = ALIGN(8);
} > FLASH_PROTECTION

.text :
Expand Down Expand Up @@ -101,28 +101,28 @@ SECTIONS
*(vtable)
*(.data*)

. = ALIGN(4);
. = ALIGN(8);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
. = ALIGN(8);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

. = ALIGN(4);
. = ALIGN(8);
/* All data end */
__data_end__ = .;

Expand Down
Loading