aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/link.x.in
diff options
context:
space:
mode:
Diffstat (limited to 'cortex-m-rt/link.x.in')
-rw-r--r--cortex-m-rt/link.x.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in
index 92004b7..4461646 100644
--- a/cortex-m-rt/link.x.in
+++ b/cortex-m-rt/link.x.in
@@ -66,6 +66,8 @@ SECTIONS
/* ### Vector table */
.vector_table ORIGIN(FLASH) :
{
+ __vector_table = .;
+
/* Initial Stack Pointer (SP) value */
LONG(_stack_start);
@@ -142,8 +144,12 @@ SECTIONS
__veneer_base = .;
*(.gnu.sgstubs*)
. = ALIGN(32);
- __veneer_limit = .;
} > FLASH
+ /* Place `__veneer_limit` outside the `.gnu.sgstubs` section because veneers are
+ * always inserted last in the section, which would otherwise be _after_ the `__veneer_limit` symbol.
+ */
+ . = ALIGN(32);
+ __veneer_limit = .;
/* ### .bss */
.bss (NOLOAD) : ALIGN(4)