_sbrk problems when linking newlib (for h8300s)
Mon Mar 31 16:43:00 GMT 2003
'end' is an external reference to the end of allocated RAM. If you look in
sbrk you will see the line: 'extern char end;' which is an external instead
of stack reference.
You need to define the symbol 'end' in your linker script. For example,
here is the .bss section of one of my linker scripts for coldfire:
. = ALIGN(0x4);
__bss_start = .;
_end = ALIGN(0x8)
__end = _end;
end = _end;
} > ram
From: Michael M Delaney [mailto:firstname.lastname@example.org]
Sent: Sunday, March 30, 2003 5:35 PM
Subject: _sbrk problems when linking newlib (for h8300s)
I'm trying to link newlib, and if I use a function from newlib I get the
sbrk.c:17: undefined reference to `end'
make: *** [test] Error 1
I don't understand whats going on here, since I could not find any
refrences to 'end' in the file, just a few #endif's. I'm using the latest
CVS, I had a problem with the newest release (I forgot exactly what it
was, but it may have been the same thing.) Does anyone have any
suggestions for how I can fix this?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3113 bytes
Desc: not available
More information about the Newlib