I have a code snippet here that exhibits a problem with the loader regarding alignment. I'm using the latest "released" files on feb 13, 2003. I don't think that this should generate an error since the msp430 doesn't seem to require word alignment of word accesses.

The code:
---------------------------------
#define _PACKED_        __attribute__ ((packed))

struct a {
       int b;
       char c;
} _PACKED_;

struct d {
       struct a e;
       int  f;
} _PACKED_;

struct d g;

int
main()
{
       g.f = 0;
       return 0;
}
---------------------------------------

compiled with:

msp430-gcc -mmcu=msp430x149 -O4 -Wall xxx.c

----------------------------------------

Outputs:

/tmp/ccxTboCm.o(.text+0x6): In function `main':
: internal error: unsupported relocation error

-------------------------------------------
Also:
msp430-gcc --version
msp430-gcc (GCC) 3.2.3
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks,

Robert Kavaler



Reply via email to