Skip to content

Commit 1606c88

Browse files
luojia65adamgreig
andcommitted
rt: fix veneer limit position in linker script
add description and hints on linker behavior at symbol `__veneer_limit` Co-authored-by: Adam Greig <adam@adamgreig.com>
1 parent ec7f7c9 commit 1606c88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cortex-m-rt/link.x.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,12 @@ SECTIONS
144144
__veneer_base = .;
145145
*(.gnu.sgstubs*)
146146
. = ALIGN(32);
147-
__veneer_limit = .;
148147
} > FLASH
148+
/* Place `__veneer_limit` outside the `.gnu.sgstubs` section because veneers are
149+
* always inserted last in the section, which would otherwise be _after_ the `__veneer_limit` symbol.
150+
*/
151+
. = ALIGN(32);
152+
__veneer_limit = .;
149153

150154
/* ### .bss */
151155
.bss (NOLOAD) : ALIGN(4)

0 commit comments

Comments
 (0)