Skip to content

Commit c673d53

Browse files
author
Deepika
committed
NXP: 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
1 parent 525545c commit c673d53

File tree

41 files changed

+429
-429
lines changed

Some content is hidden

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

41 files changed

+429
-429
lines changed

targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U68/LPC11U68.ld

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ SECTIONS
3030
{
3131

3232
/* MAIN TEXT SECTION */
33-
.text : ALIGN(4)
33+
.text : ALIGN(8)
3434
{
3535
FILL(0xff)
3636
__vectors_start__ = ABSOLUTE(.) ;
3737
KEEP(*(.isr_vector))
3838

3939
/* Global Section Table */
40-
. = ALIGN(4) ;
40+
. = ALIGN(8) ;
4141
__section_table_start = .;
4242
__data_section_table = .;
4343
LONG(LOADADDR(.data));
@@ -66,18 +66,18 @@ SECTIONS
6666

6767
*(.text*)
6868
*(.rodata .rodata.*)
69-
. = ALIGN(4);
69+
. = ALIGN(8);
7070

7171
/* C++ constructors etc */
72-
. = ALIGN(4);
72+
. = ALIGN(8);
7373
KEEP(*(.init))
7474

75-
. = ALIGN(4);
75+
. = ALIGN(8);
7676
__preinit_array_start = .;
7777
KEEP (*(.preinit_array))
7878
__preinit_array_end = .;
7979

80-
. = ALIGN(4);
80+
. = ALIGN(8);
8181
__init_array_start = .;
8282
KEEP (*(SORT(.init_array.*)))
8383
KEEP (*(.init_array))
@@ -102,13 +102,13 @@ SECTIONS
102102
* for exception handling/unwind - some Newlib functions (in common
103103
* with C++ and STDC++) use this.
104104
*/
105-
.ARM.extab : ALIGN(4)
105+
.ARM.extab : ALIGN(8)
106106
{
107107
*(.ARM.extab* .gnu.linkonce.armextab.*)
108108
} > MFlash256
109109
__exidx_start = .;
110110

111-
.ARM.exidx : ALIGN(4)
111+
.ARM.exidx : ALIGN(8)
112112
{
113113
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
114114
} > MFlash256
@@ -124,14 +124,14 @@ SECTIONS
124124
} > Ram1_2
125125

126126
/* DATA section for Ram1_2 */
127-
.data_RAM2 : ALIGN(4)
127+
.data_RAM2 : ALIGN(8)
128128
{
129129
FILL(0xff)
130130
*(.ramfunc.$RAM2)
131131
*(.ramfunc.$Ram1_2)
132132
*(.data.$RAM2*)
133133
*(.data.$Ram1_2*)
134-
. = ALIGN(4) ;
134+
. = ALIGN(8) ;
135135
} > Ram1_2 AT>MFlash256
136136
/* possible MTB section for Ram2USB_2 */
137137
.mtb_buffer_RAM3 (NOLOAD) :
@@ -141,14 +141,14 @@ SECTIONS
141141
} > Ram2USB_2
142142

143143
/* DATA section for Ram2USB_2 */
144-
.data_RAM3 : ALIGN(4)
144+
.data_RAM3 : ALIGN(8)
145145
{
146146
FILL(0xff)
147147
*(.ramfunc.$RAM3)
148148
*(.ramfunc.$Ram2USB_2)
149149
*(.data.$RAM3*)
150150
*(.data.$Ram2USB_2*)
151-
. = ALIGN(4) ;
151+
. = ALIGN(8) ;
152152
} > Ram2USB_2 AT>MFlash256
153153

154154
/* MAIN DATA SECTION */
@@ -159,74 +159,74 @@ SECTIONS
159159
KEEP(*(.mtb*))
160160
} > Ram0_32
161161

162-
.uninit_RESERVED : ALIGN(4)
162+
.uninit_RESERVED : ALIGN(8)
163163
{
164164
KEEP(*(.bss.$RESERVED*))
165-
. = ALIGN(4) ;
165+
. = ALIGN(8) ;
166166
_end_uninit_RESERVED = .;
167167
} > Ram0_32
168168

169169

170170
/* Main DATA section (Ram0_32) */
171-
.data : ALIGN(4)
171+
.data : ALIGN(8)
172172
{
173173
FILL(0xff)
174174
_data = . ;
175175
*(vtable)
176176
*(.ramfunc*)
177177
*(.data*)
178-
. = ALIGN(4) ;
178+
. = ALIGN(8) ;
179179
_edata = . ;
180180
} > Ram0_32 AT>MFlash256
181181

182182
/* BSS section for Ram1_2 */
183-
.bss_RAM2 : ALIGN(4)
183+
.bss_RAM2 : ALIGN(8)
184184
{
185185
*(.bss.$RAM2*)
186186
*(.bss.$Ram1_2*)
187-
. = ALIGN(4) ;
187+
. = ALIGN(8) ;
188188
} > Ram1_2
189189
/* BSS section for Ram2USB_2 */
190-
.bss_RAM3 : ALIGN(4)
190+
.bss_RAM3 : ALIGN(8)
191191
{
192192
*(.bss.$RAM3*)
193193
*(.bss.$Ram2USB_2*)
194-
. = ALIGN(4) ;
194+
. = ALIGN(8) ;
195195
} > Ram2USB_2
196196

197197
/* MAIN BSS SECTION */
198-
.bss : ALIGN(4)
198+
.bss : ALIGN(8)
199199
{
200200
_bss = .;
201201
*(.bss*)
202202
*(COMMON)
203-
. = ALIGN(4) ;
203+
. = ALIGN(8) ;
204204
_ebss = .;
205205
PROVIDE(end = .);
206206
__end__ = .;
207207
} > Ram0_32
208208

209209
/* NOINIT section for Ram1_2 */
210-
.noinit_RAM2 (NOLOAD) : ALIGN(4)
210+
.noinit_RAM2 (NOLOAD) : ALIGN(8)
211211
{
212212
*(.noinit.$RAM2*)
213213
*(.noinit.$Ram1_2*)
214-
. = ALIGN(4) ;
214+
. = ALIGN(8) ;
215215
} > Ram1_2
216216
/* NOINIT section for Ram2USB_2 */
217-
.noinit_RAM3 (NOLOAD) : ALIGN(4)
217+
.noinit_RAM3 (NOLOAD) : ALIGN(8)
218218
{
219219
*(.noinit.$RAM3*)
220220
*(.noinit.$Ram2USB_2*)
221-
. = ALIGN(4) ;
221+
. = ALIGN(8) ;
222222
} > Ram2USB_2
223223

224224
/* DEFAULT NOINIT SECTION */
225-
.noinit (NOLOAD): ALIGN(4)
225+
.noinit (NOLOAD): ALIGN(8)
226226
{
227227
_noinit = .;
228228
*(.noinit*)
229-
. = ALIGN(4) ;
229+
. = ALIGN(8) ;
230230
_end_noinit = .;
231231
} > Ram0_32
232232

targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_CR/TARGET_LPC11U68/LPC11U68.ld

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ SECTIONS
3131
{
3232

3333
/* MAIN TEXT SECTION */
34-
.text : ALIGN(4)
34+
.text : ALIGN(8)
3535
{
3636
FILL(0xff)
3737
KEEP(*(.isr_vector))
3838
*(.text.ResetISR)
3939
*(.text.SystemInit)
4040

4141
/* Global Section Table */
42-
. = ALIGN(4) ;
42+
. = ALIGN(8) ;
4343
__section_table_start = .;
4444
__data_section_table = .;
4545
LONG(LOADADDR(.data));
@@ -68,18 +68,18 @@ SECTIONS
6868

6969
*(.text*)
7070
*(.rodata .rodata.*)
71-
. = ALIGN(4);
71+
. = ALIGN(8);
7272

7373
/* C++ constructors etc */
74-
. = ALIGN(4);
74+
. = ALIGN(8);
7575
KEEP(*(.init))
7676

77-
. = ALIGN(4);
77+
. = ALIGN(8);
7878
__preinit_array_start = .;
7979
KEEP (*(.preinit_array))
8080
__preinit_array_end = .;
8181

82-
. = ALIGN(4);
82+
. = ALIGN(8);
8383
__init_array_start = .;
8484
KEEP (*(SORT(.init_array.*)))
8585
KEEP (*(.init_array))
@@ -104,13 +104,13 @@ SECTIONS
104104
* for exception handling/unwind - some Newlib functions (in common
105105
* with C++ and STDC++) use this.
106106
*/
107-
.ARM.extab : ALIGN(4)
107+
.ARM.extab : ALIGN(8)
108108
{
109109
*(.ARM.extab* .gnu.linkonce.armextab.*)
110110
} > MFlash256
111111
__exidx_start = .;
112112

113-
.ARM.exidx : ALIGN(4)
113+
.ARM.exidx : ALIGN(8)
114114
{
115115
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
116116
} > MFlash256
@@ -126,14 +126,14 @@ SECTIONS
126126
} > Ram1_2
127127

128128
/* DATA section for Ram1_2 */
129-
.data_RAM2 : ALIGN(4)
129+
.data_RAM2 : ALIGN(8)
130130
{
131131
FILL(0xff)
132132
*(.ramfunc.$RAM2)
133133
*(.ramfunc.$Ram1_2)
134134
*(.data.$RAM2*)
135135
*(.data.$Ram1_2*)
136-
. = ALIGN(4) ;
136+
. = ALIGN(8) ;
137137
} > Ram1_2 AT>MFlash256
138138
/* possible MTB section for Ram2USB_2 */
139139
.mtb_buffer_RAM3 (NOLOAD) :
@@ -143,14 +143,14 @@ SECTIONS
143143
} > Ram2USB_2
144144

145145
/* DATA section for Ram2USB_2 */
146-
.data_RAM3 : ALIGN(4)
146+
.data_RAM3 : ALIGN(8)
147147
{
148148
FILL(0xff)
149149
*(.ramfunc.$RAM3)
150150
*(.ramfunc.$Ram2USB_2)
151151
*(.data.$RAM3*)
152152
*(.data.$Ram2USB_2*)
153-
. = ALIGN(4) ;
153+
. = ALIGN(8) ;
154154
} > Ram2USB_2 AT>MFlash256
155155

156156
/* MAIN DATA SECTION */
@@ -161,74 +161,74 @@ SECTIONS
161161
KEEP(*(.mtb*))
162162
} > Ram0_32
163163

164-
.uninit_RESERVED : ALIGN(4)
164+
.uninit_RESERVED : ALIGN(8)
165165
{
166166
KEEP(*(.bss.$RESERVED*))
167-
. = ALIGN(4) ;
167+
. = ALIGN(8) ;
168168
_end_uninit_RESERVED = .;
169169
} > Ram0_32
170170

171171

172172
/* Main DATA section (Ram0_32) */
173-
.data : ALIGN(4)
173+
.data : ALIGN(8)
174174
{
175175
FILL(0xff)
176176
_data = . ;
177177
*(vtable)
178178
*(.ramfunc*)
179179
*(.data*)
180-
. = ALIGN(4) ;
180+
. = ALIGN(8) ;
181181
_edata = . ;
182182
} > Ram0_32 AT>MFlash256
183183

184184
/* BSS section for Ram1_2 */
185-
.bss_RAM2 : ALIGN(4)
185+
.bss_RAM2 : ALIGN(8)
186186
{
187187
*(.bss.$RAM2*)
188188
*(.bss.$Ram1_2*)
189-
. = ALIGN(4) ;
189+
. = ALIGN(8) ;
190190
} > Ram1_2
191191
/* BSS section for Ram2USB_2 */
192-
.bss_RAM3 : ALIGN(4)
192+
.bss_RAM3 : ALIGN(8)
193193
{
194194
*(.bss.$RAM3*)
195195
*(.bss.$Ram2USB_2*)
196-
. = ALIGN(4) ;
196+
. = ALIGN(8) ;
197197
} > Ram2USB_2
198198

199199
/* MAIN BSS SECTION */
200-
.bss : ALIGN(4)
200+
.bss : ALIGN(8)
201201
{
202202
_bss = .;
203203
*(.bss*)
204204
*(COMMON)
205-
. = ALIGN(4) ;
205+
. = ALIGN(8) ;
206206
_ebss = .;
207207
PROVIDE(end = .);
208208
__end__ = .;
209209
} > Ram0_32
210210

211211
/* NOINIT section for Ram1_2 */
212-
.noinit_RAM2 (NOLOAD) : ALIGN(4)
212+
.noinit_RAM2 (NOLOAD) : ALIGN(8)
213213
{
214214
*(.noinit.$RAM2*)
215215
*(.noinit.$Ram1_2*)
216-
. = ALIGN(4) ;
216+
. = ALIGN(8) ;
217217
} > Ram1_2
218218
/* NOINIT section for Ram2USB_2 */
219-
.noinit_RAM3 (NOLOAD) : ALIGN(4)
219+
.noinit_RAM3 (NOLOAD) : ALIGN(8)
220220
{
221221
*(.noinit.$RAM3*)
222222
*(.noinit.$Ram2USB_2*)
223-
. = ALIGN(4) ;
223+
. = ALIGN(8) ;
224224
} > Ram2USB_2
225225

226226
/* DEFAULT NOINIT SECTION */
227-
.noinit (NOLOAD): ALIGN(4)
227+
.noinit (NOLOAD): ALIGN(8)
228228
{
229229
_noinit = .;
230230
*(.noinit*)
231-
. = ALIGN(4) ;
231+
. = ALIGN(8) ;
232232
_end_noinit = .;
233233
} > Ram0_32
234234

targets/TARGET_NXP/TARGET_LPC11UXX/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U24_301/LPC11U24.ld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,28 @@ SECTIONS
9292
*(vtable)
9393
*(.data*)
9494

95-
. = ALIGN(4);
95+
. = ALIGN(8);
9696
/* preinit data */
9797
PROVIDE (__preinit_array_start = .);
9898
KEEP(*(.preinit_array))
9999
PROVIDE (__preinit_array_end = .);
100100

101-
. = ALIGN(4);
101+
. = ALIGN(8);
102102
/* init data */
103103
PROVIDE (__init_array_start = .);
104104
KEEP(*(SORT(.init_array.*)))
105105
KEEP(*(.init_array))
106106
PROVIDE (__init_array_end = .);
107107

108108

109-
. = ALIGN(4);
109+
. = ALIGN(8);
110110
/* finit data */
111111
PROVIDE (__fini_array_start = .);
112112
KEEP(*(SORT(.fini_array.*)))
113113
KEEP(*(.fini_array))
114114
PROVIDE (__fini_array_end = .);
115115

116-
. = ALIGN(4);
116+
. = ALIGN(8);
117117
/* All data end */
118118
__data_end__ = .;
119119

0 commit comments

Comments
 (0)