Redefining the end up procedure

From the example above you can see, that main jumps to "__stop_progExec__", which can be redefined the same way in the user code. However, it is possible to save some space, by specifying the return point as "main()". If you compile with

$ msp430-gcc -mendup-at=main ...
you will get

...
0000fc08 <main>:
    fc08:       31 40 80 02     mov     #640,   SP      ;  #0x0280
    fc0c:       30 40 10 fc     br      #0xfc08
...

and "__stop_progExec__" will not be linked.