Skip to content

Commit bf1a2c8

Browse files
author
Deepika
committed
[ST]: Fix alignment of execute region to 8-byte boundary in ARM linker files
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to remove deprecated flags all linker files should strictly align to 8-byte boundary
1 parent fd4f47d commit bf1a2c8

File tree

103 files changed

+464
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+464
-447
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/device/TOOLCHAIN_GCC_ARM/STM32F0xx.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,29 +85,29 @@ SECTIONS
8585
*(vtable)
8686
*(.data*)
8787

88-
. = ALIGN(4);
88+
. = ALIGN(8);
8989
/* preinit data */
9090
PROVIDE_HIDDEN (__preinit_array_start = .);
9191
KEEP(*(.preinit_array))
9292
PROVIDE_HIDDEN (__preinit_array_end = .);
9393

94-
. = ALIGN(4);
94+
. = ALIGN(8);
9595
/* init data */
9696
PROVIDE_HIDDEN (__init_array_start = .);
9797
KEEP(*(SORT(.init_array.*)))
9898
KEEP(*(.init_array))
9999
PROVIDE_HIDDEN (__init_array_end = .);
100100

101101

102-
. = ALIGN(4);
102+
. = ALIGN(8);
103103
/* finit data */
104104
PROVIDE_HIDDEN (__fini_array_start = .);
105105
KEEP(*(SORT(.fini_array.*)))
106106
KEEP(*(.fini_array))
107107
PROVIDE_HIDDEN (__fini_array_end = .);
108108

109109
KEEP(*(.jcr*))
110-
. = ALIGN(4);
110+
. = ALIGN(8);
111111
/* All data end */
112112
__data_end__ = .;
113113
_edata = .;
@@ -116,12 +116,12 @@ SECTIONS
116116

117117
.bss :
118118
{
119-
. = ALIGN(4);
119+
. = ALIGN(8);
120120
__bss_start__ = .;
121121
_sbss = .;
122122
*(.bss*)
123123
*(COMMON)
124-
. = ALIGN(4);
124+
. = ALIGN(8);
125125
__bss_end__ = .;
126126
_ebss = .;
127127
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/TOOLCHAIN_ARM_MICRO/stm32f0xx.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
.ANY (+RO)
3737
}
3838

39-
; 45 vectors = 180 bytes (0xB4) to be reserved in RAM
40-
RW_IRAM1 (0x20000000+0xB4) (0x2000-0xB4) { ; RW data
39+
; 45 vectors = 180 bytes (0xB4) 8-byte aligned = 0xB8 (0xB4 + 0x4) to be reserved in RAM
40+
RW_IRAM1 (0x20000000+0xB8) (0x2000-0xB8) { ; RW data
4141
.ANY (+RW +ZI)
4242
}
4343

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/TOOLCHAIN_ARM_STD/stm32f0xx.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
.ANY (+RO)
3737
}
3838

39-
; 45 vectors = 180 bytes (0xB4) to be reserved in RAM
40-
RW_IRAM1 (0x20000000+0xB4) (0x2000-0xB4) { ; RW data
39+
; 45 vectors = 180 bytes (0xB4); 8-byte aligned = 0xB8 (0xB4 + 0x4) to be reserved in RAM
40+
RW_IRAM1 (0x20000000+0xB8) (0x2000-0xB8) { ; RW data
4141
.ANY (+RW +ZI)
4242
}
4343

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/device/TOOLCHAIN_GCC_ARM/STM32F030X8.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/device/TOOLCHAIN_GCC_ARM/STM32F031X6.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/device/TOOLCHAIN_GCC_ARM/STM32F042X6.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/device/TOOLCHAIN_GCC_ARM/STM32F070XB.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/device/TOOLCHAIN_GCC_ARM/STM32F072XB.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/device/TOOLCHAIN_GCC_ARM/STM32F091XC.ld

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,29 @@ SECTIONS
8484
*(vtable)
8585
*(.data*)
8686

87-
. = ALIGN(4);
87+
. = ALIGN(8);
8888
/* preinit data */
8989
PROVIDE_HIDDEN (__preinit_array_start = .);
9090
KEEP(*(.preinit_array))
9191
PROVIDE_HIDDEN (__preinit_array_end = .);
9292

93-
. = ALIGN(4);
93+
. = ALIGN(8);
9494
/* init data */
9595
PROVIDE_HIDDEN (__init_array_start = .);
9696
KEEP(*(SORT(.init_array.*)))
9797
KEEP(*(.init_array))
9898
PROVIDE_HIDDEN (__init_array_end = .);
9999

100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* finit data */
103103
PROVIDE_HIDDEN (__fini_array_start = .);
104104
KEEP(*(SORT(.fini_array.*)))
105105
KEEP(*(.fini_array))
106106
PROVIDE_HIDDEN (__fini_array_end = .);
107107

108108
KEEP(*(.jcr*))
109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* All data end */
111111
__data_end__ = .;
112112
_edata = .;
@@ -115,12 +115,12 @@ SECTIONS
115115

116116
.bss :
117117
{
118-
. = ALIGN(4);
118+
. = ALIGN(8);
119119
__bss_start__ = .;
120120
_sbss = .;
121121
*(.bss*)
122122
*(COMMON)
123-
. = ALIGN(4);
123+
. = ALIGN(8);
124124
__bss_end__ = .;
125125
_ebss = .;
126126
} > RAM

0 commit comments

Comments
 (0)