Ok, here is an update. I compiled the latest libc.a from CVS and now
I get a relocation error from the linker (LD 2.16) whenever I try to
do a memcpy from an odd address. For example:
#include <string.h>
volatile unsigned char uint8[3] = {1,2,3};
int main(void) {
volatile unsigned uint16 = 0;
// This one works
memcpy((char *)&uint16, (char *)&uint8[0], sizeof(uint16));
// This one does not
memcpy((char *)&uint16, (char *)&uint8[1], sizeof(uint16));
return 0;
}
I made the variables volatile so they don't get optimized away.
I compile it with:
>msp430-gcc -mmcu=msp430x1611 -O memcpy_test.c -c
And when I link it I get:
>msp430-gcc -mmcu=msp430x1611 memcpy_test.o -o memcpy_test.elf
memcpy_test.o: In function `main':
memcpy_test.c:(.text+0x10): warning: internal error: unsupported
relocation error
The error occurs on the second memcpy where the source is at an odd
address. The error sometimes goes away if I change the optimization
level or add the -g flag, but this does not seem to be repeatable.
Regards,
Andrew