If you want to declare .weakreference for a set of interrupt vectors such as:
.weakreference ISR_SPI_HANDLER, defaultExceptionHandler
in a startup.S file or some framework include, it's very useful except that if you then declare ISR_SPI_HANDLER as a function in your main.c file, ISR_SPI_HANDLER in the startup.S still resolves to defaultExceptionHandler because .weakreference only works in local scope (terminology? pre-linking). However, .weak functions as it's expected, and allows you to "override" the definition with a definition in main.c, but if you don't, you'll always resolve to 0x00, which is inferior obviously to resolving to a default vector.
How can I overcome this?