Bug #1130
add compiler directive to prevent stack junk
Start date:
02/23/2010
Due date:
% Done:
0%
Description
Everytime we call main_start we we leaving the shell of the bootloader on the stack. If we declare it with attribute((noreturn)) in the prototype it will prevent this.
example:
typedef void (*AppPtr_t)(void) attribute ((noreturn));
AppPtr_t AppStartPtr = (AppPtr_t)XxXXXX;
AppStartPtr();
History
#1 Updated by Kevin Woo almost 14 years ago
- Status changed from Assigned to Fixed
Made the main function in the bootloader naked which should do the same thing. This will prevent recursive calls to it from taking up too much stack space.
#2 Updated by Kevin Woo almost 14 years ago
Adding this to the main function actually fails. It makes more sense to add this to the main_start function pointer. It saved us about 8 bytes of instructions. This one worked.