From 9fd9e16e6598771eb1cf6320529fc6661e29077d Mon Sep 17 00:00:00 2001 From: James Munns Date: Sun, 19 Nov 2023 19:43:21 +0100 Subject: [PATCH] Rename `__reset_vector` to `__exceptions` Closes #495 --- cortex-m-rt/link.x.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index 01bef98d..5b13befa 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -79,11 +79,11 @@ SECTIONS /* Reset vector */ KEEP(*(.vector_table.reset_vector)); /* this is the `__RESET_VECTOR` symbol */ - __reset_vector = .; /* Exceptions */ + __exceptions = .; /* start of exceptions */ KEEP(*(.vector_table.exceptions)); /* this is the `__EXCEPTIONS` symbol */ - __eexceptions = .; + __eexceptions = .; /* end of exceptions */ /* Device specific interrupts */ KEEP(*(.vector_table.interrupts)); /* this is the `__INTERRUPTS` symbol */ @@ -231,8 +231,13 @@ origin and length are set to multiples of 8 in the `memory.x` file."); /* # Position checks */ -/* ## .vector_table */ -ASSERT(__reset_vector == ADDR(.vector_table) + 0x8, " +/* ## .vector_table + * + * If the *start* of exception vectors is not 8 bytes past the start of the + * vector table, then we somehow did not place the reset vector, which should + * live 4 bytes past the start of the vector table. + */ +ASSERT(__exceptions == ADDR(.vector_table) + 0x8, " BUG(cortex-m-rt): the reset vector is missing"); ASSERT(__eexceptions == ADDR(.vector_table) + 0x40, "