Skip to content

Commit

Permalink
Remove uncallable libc call
Browse files Browse the repository at this point in the history
main() never exits. The subsequent call to exit() links in the libc
exit symbol and all that it calls (including free() and a few others.
Removing this saves around 2k of flash.
  • Loading branch information
justinschoeman committed Aug 24, 2018
1 parent 6a9c795 commit a58f650
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions STM32F1/variants/generic_stm32f103c/wirish/start_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ void __attribute__((noreturn)) start_c(void) {

/* Jump to main. */
exit_code = main(0, 0, 0);
if (exit) {
exit(exit_code);
}

/* If exit is NULL, make sure we don't return. */
for (;;)
Expand Down

0 comments on commit a58f650

Please sign in to comment.