Skip to content

Commit 9fd9e16

Browse files
committed
Rename __reset_vector to __exceptions
Closes #495
1 parent 08d30ea commit 9fd9e16

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cortex-m-rt/link.x.in

+9-4
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ SECTIONS
7979

8080
/* Reset vector */
8181
KEEP(*(.vector_table.reset_vector)); /* this is the `__RESET_VECTOR` symbol */
82-
__reset_vector = .;
8382

8483
/* Exceptions */
84+
__exceptions = .; /* start of exceptions */
8585
KEEP(*(.vector_table.exceptions)); /* this is the `__EXCEPTIONS` symbol */
86-
__eexceptions = .;
86+
__eexceptions = .; /* end of exceptions */
8787

8888
/* Device specific interrupts */
8989
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.");
231231

232232
/* # Position checks */
233233

234-
/* ## .vector_table */
235-
ASSERT(__reset_vector == ADDR(.vector_table) + 0x8, "
234+
/* ## .vector_table
235+
*
236+
* If the *start* of exception vectors is not 8 bytes past the start of the
237+
* vector table, then we somehow did not place the reset vector, which should
238+
* live 4 bytes past the start of the vector table.
239+
*/
240+
ASSERT(__exceptions == ADDR(.vector_table) + 0x8, "
236241
BUG(cortex-m-rt): the reset vector is missing");
237242

238243
ASSERT(__eexceptions == ADDR(.vector_table) + 0x40, "

0 commit comments

Comments
 (0)