Atmel: Fix alignment of execute region to 8-byte boundary

--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files (GCC and IAR as well to have uniformity)
should strictly align to 8-byte boundary
pull/8024/head
Deepika 2018-09-19 10:10:25 -05:00 committed by deepikabhavnani
parent 8c17ff6168
commit 5a25fd9ff3
11 changed files with 90 additions and 90 deletions

View File

@ -11,8 +11,8 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
.ANY (+RO)
}
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4) { ; RW data
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4+0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8) { ; RW data
.ANY (+RW +ZI)
}

View File

@ -11,8 +11,8 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
.ANY (+RO)
}
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4) { ; RW data
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4+0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8) { ; RW data
.ANY (+RW +ZI)
}

View File

@ -5,7 +5,7 @@ SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY {
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
ram (rwx) : ORIGIN = 0x20000000 + 0xB4, LENGTH = 0x00008000 - 0xB4
ram (rwx) : ORIGIN = 0x20000000 + 0xB8, LENGTH = 0x00008000 - 0xB8
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
@ -15,7 +15,7 @@ MEMORY {
SECTIONS {
.text :
{
. = ALIGN(4);
. = ALIGN(8);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
@ -25,29 +25,29 @@ MEMORY {
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.init))
. = ALIGN(4);
. = ALIGN(8);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.fini))
. = ALIGN(4);
. = ALIGN(8);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
@ -58,7 +58,7 @@ MEMORY {
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
. = ALIGN(8);
_efixed = .; /* End of text section */
} > rom
@ -70,36 +70,36 @@ MEMORY {
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
. = ALIGN(8);
_etext = .;
.relocate :
AT (_etext)
{
. = ALIGN(4);
. = ALIGN(8);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
. = ALIGN(8);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = . ;
_ezero = .;
} > ram
.heap (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
__end__ = . ;
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
} > ram
@ -114,5 +114,5 @@ MEMORY {
_estack = .;
} > ram
. = ALIGN(4);
. = ALIGN(8);
}

View File

@ -11,8 +11,8 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
.ANY (+RO)
}
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4) { ; RW data
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4 +0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8) { ; RW data
.ANY (+RW +ZI)
}

View File

@ -11,8 +11,8 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
.ANY (+RO)
}
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4) { ; RW data
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4+0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8) { ; RW data
.ANY (+RW +ZI)
}

View File

@ -5,7 +5,7 @@ SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY {
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
ram (rwx) : ORIGIN = 0x20000000 + 0xB4, LENGTH = 0x00008000 - 0xB4
ram (rwx) : ORIGIN = 0x20000000 + 0xB8, LENGTH = 0x00008000 - 0xB8
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
@ -15,7 +15,7 @@ MEMORY {
SECTIONS {
.text :
{
. = ALIGN(4);
. = ALIGN(8);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
@ -25,29 +25,29 @@ MEMORY {
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.init))
. = ALIGN(4);
. = ALIGN(8);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.fini))
. = ALIGN(4);
. = ALIGN(8);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
@ -58,7 +58,7 @@ MEMORY {
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
. = ALIGN(8);
_efixed = .; /* End of text section */
} > rom
@ -70,36 +70,36 @@ MEMORY {
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
. = ALIGN(8);
_etext = .;
.relocate :
AT (_etext)
{
. = ALIGN(4);
. = ALIGN(8);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
. = ALIGN(8);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = . ;
_ezero = .;
} > ram
.heap (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
__end__ = . ;
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
} > ram
@ -114,5 +114,5 @@ MEMORY {
_estack = .;
} > ram
. = ALIGN(4);
. = ALIGN(8);
}

View File

@ -18,8 +18,8 @@ LR_IROM1 0x00000000 0x40000 { ;
}
;
[RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4)
[RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4+0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8)
{
;
RW data

View File

@ -10,8 +10,8 @@ LR_IROM1 0x00000000 0x40000 { ; load region size_region
.ANY (+RO)
}
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4) - alignment
RW_IRAM1 (0x20000000+0xB4) (0x8000-0xB4) { ; RW data
; [RAM] Vector table dynamic copy: 45 vectors * 4 bytes = (0xB4+0x4) 8-byte alignment
RW_IRAM1 (0x20000000+0xB8) (0x8000-0xB8) { ; RW data
.ANY (+RW +ZI)
}
}

View File

@ -5,7 +5,7 @@ SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY {
rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
ram (rwx) : ORIGIN = 0x20000000 + 0xB4, LENGTH = 0x00008000 - 0xB4
ram (rwx) : ORIGIN = 0x20000000 + 0xB8, LENGTH = 0x00008000 - 0xB8
}
/* The stack size used by the application. NOTE: you need to adjust according to your application. */
@ -15,7 +15,7 @@ MEMORY {
SECTIONS {
.text :
{
. = ALIGN(4);
. = ALIGN(8);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
@ -25,29 +25,29 @@ MEMORY {
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.init))
. = ALIGN(4);
. = ALIGN(8);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.fini))
. = ALIGN(4);
. = ALIGN(8);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
@ -58,7 +58,7 @@ MEMORY {
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
. = ALIGN(8);
_efixed = .; /* End of text section */
} > rom
@ -70,36 +70,36 @@ MEMORY {
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
. = ALIGN(8);
_etext = .;
.relocate :
AT (_etext)
{
. = ALIGN(4);
. = ALIGN(8);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
. = ALIGN(8);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = . ;
_ezero = .;
} > ram
.heap (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
__end__ = . ;
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
} > ram
@ -114,5 +114,5 @@ MEMORY {
_estack = .;
} > ram
. = ALIGN(4);
. = ALIGN(8);
}

View File

@ -15,7 +15,7 @@ MEMORY {
SECTIONS {
.text :
{
. = ALIGN(4);
. = ALIGN(8);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
@ -25,29 +25,29 @@ MEMORY {
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.init))
. = ALIGN(4);
. = ALIGN(8);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.fini))
. = ALIGN(4);
. = ALIGN(8);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
@ -58,7 +58,7 @@ MEMORY {
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
. = ALIGN(8);
_efixed = .; /* End of text section */
} > rom
@ -70,36 +70,36 @@ MEMORY {
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
. = ALIGN(8);
_etext = .;
.relocate :
AT (_etext)
{
. = ALIGN(4);
. = ALIGN(8);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
. = ALIGN(8);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = . ;
_ezero = .;
} > ram
.heap (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
__end__ = . ;
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
} > ram
@ -114,5 +114,5 @@ MEMORY {
_estack = .;
} > ram
. = ALIGN(4);
. = ALIGN(8);
}

View File

@ -15,7 +15,7 @@ MEMORY {
SECTIONS {
.text :
{
. = ALIGN(4);
. = ALIGN(8);
_sfixed = .;
KEEP(*(.vectors .vectors.*))
*(.text .text.* .gnu.linkonce.t.*)
@ -25,29 +25,29 @@ MEMORY {
/* Support C constructors, and C destructors in both user code
and the C library. This also provides support for C++ code. */
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.init))
. = ALIGN(4);
. = ALIGN(8);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
. = ALIGN(4);
. = ALIGN(8);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
. = ALIGN(4);
. = ALIGN(8);
KEEP(*(.fini))
. = ALIGN(4);
. = ALIGN(8);
__fini_array_start = .;
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
@ -58,7 +58,7 @@ MEMORY {
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
. = ALIGN(4);
. = ALIGN(8);
_efixed = .; /* End of text section */
} > rom
@ -70,36 +70,36 @@ MEMORY {
} > rom
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
. = ALIGN(8);
_etext = .;
.relocate :
AT (_etext)
{
. = ALIGN(4);
. = ALIGN(8);
_srelocate = .;
*(.ramfunc .ramfunc.*);
*(.data .data.*);
. = ALIGN(4);
. = ALIGN(8);
_erelocate = .;
} > ram
/* .bss section which is used for uninitialized data */
.bss (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
. = ALIGN(8);
_ebss = . ;
_ezero = .;
} > ram
.heap (NOLOAD) :
{
. = ALIGN(4);
. = ALIGN(8);
__end__ = . ;
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
} > ram
@ -114,5 +114,5 @@ MEMORY {
_estack = .;
} > ram
. = ALIGN(4);
. = ALIGN(8);
}