Skip to content

Commit

Permalink
cm3/vector: Made the vector table and reset handler declarations LTO-…
Browse files Browse the repository at this point in the history
…safe by marking them used
  • Loading branch information
dragonmux committed Jan 14, 2024
1 parent 2e22a33 commit 026d258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cm3/vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main(void);
void blocking_handler(void);
void null_handler(void);

__attribute__ ((section(".vectors")))
__attribute__((section(".vectors"), used))
vector_table_t vector_table = {
.initial_sp_value = &_stack,
.reset = reset_handler,
Expand All @@ -59,7 +59,7 @@ vector_table_t vector_table = {
}
};

void __attribute__ ((weak)) reset_handler(void)
void __attribute__((weak, used)) reset_handler(void)
{
volatile unsigned *src, *dest;
funcp_t *fp;
Expand Down

0 comments on commit 026d258

Please sign in to comment.