Commit 264f6ee9 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski Committed by Dominik Ermel
Browse files

boot/zephyr/main: fix placement of pointer to arm vector



pointer to the image ARM vector table should be placed out of
stack which is being reconfigured before vt is used for branch
to the application. This caused transient boot failure when
CONFIG_LTO=y.

Moved vt to static data scope.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent c412cdfb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -147,7 +147,10 @@ struct arm_vector_table {

static void do_boot(struct boot_rsp *rsp)
{
    struct arm_vector_table *vt;
    /* vt is static as it shall not land on the stack,
     * as this procedure modifies stack pointer before usage of *vt
     */
    static struct arm_vector_table *vt;

    /* The beginning of the image is the ARM vector table, containing
     * the initial stack pointer address and the reset vector