I think I'm hitting a bug where msp430-ld doesn't update relocations correctly when doing partial linking.
When some relocations are defined with reference to the .text section, I would expect ld to update the relocations to refer to the new merged .text section, but the relocation are just kept as is. This result in bad relocations in the merged object. Here is a simple example (I'm using version 2.21.52.20110606 from Ubuntu): gaetan@Ubuntu-VBox:~/ecm$ cat a.c char* frobnicate() { return "Zoinx!\n"; } gaetan@Ubuntu-VBox:~/ecm$ cat b.c char* frobnicate2() { return "Pouet!\n"; } gaetan@Ubuntu-VBox:~/ecm$ msp430-gcc a.c gaetan@Ubuntu-VBox:~/ecm$ msp430-gcc b.c gaetan@Ubuntu-VBox:~/ecm$ msp430-ld -r a.o b.o -o ab.o gaetan@Ubuntu-VBox:~/ecm$ msp430-objdump -r ab.o ab.o: file format elf32-msp430 RELOCATION RECORDS FOR [.text]: OFFSET TYPE VALUE 00000010 R_MSP430_16_BYTE .text 00000026 R_MSP430_16_BYTE .text In the merged object the two relocations refer to the same place, which look like an obvious mistake. When using a regular x86 binutils, I do have two different relocations. Please tell me if this should rather be reported to the upstream binutils. -- Gaëtan Leurent ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now! http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users