I have a piece of code that uses interrupts. Generally, the values of the interrupts are saved in the ELF file in sections called RTC, PORT2, TIMER2_A1 etc.
When flashed, those values are copied to the interrupt vector table at 0xFFD2.
However, in my relocatable file, the sections have value 0, and their relocations ALL point to __TI_ISR_TRAP, when the TIMER0_A1 and TIMER0_A0 should point to my functions.
Dump of the values of the interrupts:
Contents of section RTC: ffd2 0000 .. Contents of section PORT2: ffd4 0000 .. Contents of section TIMER2_A1: ffd6 0000 .. Contents of section TIMER2_A0: ffd8 0000 .. Contents of section USCI_B1: ffda 0000 .. Contents of section USCI_A1: ffdc 0000 .. Contents of section PORT1: ffde 0000 .. Contents of section TIMER1_A1: ffe0 0000 .. Contents of section TIMER1_A0: ffe2 0000 .. Contents of section DMA: ffe4 0000 .. Contents of section USB_UBM: ffe6 0000 .. Contents of section TIMER0_A1: ffe8 0000 .. Contents of section TIMER0_A0: ffea 0000 .. Contents of section ADC12: ffec 0000 .. Contents of section USCI_B0: ffee 0000 .. Contents of section USCI_A0: fff0 0000 .. Contents of section WDT: fff2 0000 .. Contents of section TIMER0_B1: fff4 0000 .. Contents of section TIMER0_B0: fff6 0000 .. Contents of section COMP_B: fff8 0000 .. Contents of section UNMI: fffa 0000 .. Contents of section SYSNMI: fffc 0000 .. Contents of section .reset: fffe 0000 ..
Dump of the relocations:
Relocation section '.relRTC' at offset 0xc4d0 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relPORT2' at offset 0xc4d8 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER2_A1' at offset 0xc4e0 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER2_A0' at offset 0xc4e8 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUSCI_B1' at offset 0xc4f0 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUSCI_A1' at offset 0xc4f8 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relPORT1' at offset 0xc500 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER1_A1' at offset 0xc508 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER1_A0' at offset 0xc510 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relDMA' at offset 0xc518 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUSB_UBM' at offset 0xc520 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relADC12' at offset 0xc528 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUSCI_B0' at offset 0xc530 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUSCI_A0' at offset 0xc538 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relWDT' at offset 0xc540 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER0_B1' at offset 0xc548 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relTIMER0_B0' at offset 0xc550 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relCOMP_B' at offset 0xc558 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relUNMI' at offset 0xc560 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP Relocation section '.relSYSNMI' at offset 0xc568 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 0005a702 R_MSP430_ABS16 00000034 __TI_ISR_TRAP
Relocation section '.rel.reset' at offset 0xc298 contains 1 entries: Offset Info Type Sym.Value Sym. Name 00000000 00058b02 R_MSP430_ABS16 00000000 _c_int00
Any ideas ? Can someone reproduce it ?
Thank you.
EDIT: Just in case, this is how the normal ELF looks like.

