Thanks for spotting this.

this particular error means that you've got  odd bytes allocated in ram.

This is not easy to make a decision what to do -- either patch malloc or 
linker scripts.
Possible solutions for you now will be:
1. Just define dummy char variable somewhere.
- or -
2. do not use malloc :)
3. patch malloc:
==================================================
--- /home/diwil/MSP430/SF/msp430-libc/src/stdlib/malloc.c       Thu Jul 10 
18:30:59 2003
+++ malloc.c    Thu Jul 10 19:06:24 2003
@@ -1,4 +1,3 @@
-
 #include <stdlib.h>

 #define XSIZE(x) ((*x)>>1)
@@ -13,7 +12,8 @@
 {
     static char once;
     size_t * heap_bottom;
-    size_t * heap_top = &__bss_end;
+    size_t kk = (size_t) (&__bss_end);
+    size_t * heap_top = (size_t *)((kk+1)&~1);
     char f = 0;

     if (!once)
@@ -67,4 +67,3 @@
     size_t *t = (size_t*)p - 1;
     MARK_FREE (t);
 }
=====================================================

I'll patch malloc in CVS shortly.



On Thursday 10 July 2003 18:12, Peter Mueller wrote:
> Hi Daniel,
>
> thanks for your help. Now there seems to be another problem:
>
> $ make
> msp430-gcc -mmcu=msp430x149 -o sample StateHan.o main.o
> scexample.o
> /cygdrive/c/mspgcc/lib/gcc-lib/msp430/3.2.3/../../../../msp430/lib/msp2/lib
>c.a(m alloc.o)(.text+0x1e): In function `malloc':
> /cygdrive/c/mspgcc-source/msp430/msp430-libc/src/stdlib/malloc.c:21:
> internal er
> ror: unsupported relocation error
>
> Any idea?
>
> Peter
>
> > Peter Mueller <peter.o.muel...@gmx.de> writes:
> > > msp430-gcc -o sample StateHan.o main.o scexample.o
> > > msp430-ld: region text is full (sample section .text)
> > > msp430-ld: section .vectors [0000ffe0 -> 0000ffff] overlaps section
> >
> > .text
> >
> > [snip]
> >
> > > CFLAGS = -g -I. -O2 -mmcu=msp430x149
> >
> > You need to pass the -mmcu option when linking too, so that a suitable
> > linker script is used (and suitable library variants).
> >
> >
> > Regards,
> >   --Daniel
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by: Parasoft
> > Error proof Web apps, automate testing & more.
> > Download & eval WebKing and get a free book.
> > www.parasoft.com/bulletproofapps
> > _______________________________________________
> > Mspgcc-users mailing list
> > Mspgcc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users

-- 
/*****************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild     UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  State Polytechnical Univ.
      (_Y_.)'  ._   )  `._ `. ``-..-'   Radio-Physics Departament
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,  Russia
   (il),-''  (li),'  ((!.-'             +7 (812) 5403923, 5585314
 *****************************************************************/


Reply via email to