I placed port and interrupt related to that port into a library. On Keil compiler I can declare interrupt routine as weak, which causes routine to be linked only if any of other functions are referred by application code.
However, MSP430 compiler links interrupt routine even if I enabled GCC extensions and declared it as weak. Linking interrupt routine also adds other port related stuff, which causes a lot of extra unused binary section..
How can solve that issue?