define a dummy char variable betwen structures and main.
~d

On Wednesday 07 July 2004 14:19, Robert Kavaler wrote:
> 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
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to