_sbrk: undefined reference to `end' problem

Nick Clifton nickc@redhat.com
Sun Jun 1 09:20:00 GMT 2008


Hi Jonathan,

>> Note: putting the "PROVIDE (end = .);" at the end of your linker script 
>> is incorrect because presumably you have also provided the location of 
>> the start of the stack...
> 
> It is not clear (to me) why start of stack should be encoded within the
> ELF file.

It isn't.  It is encoded within the linker script used to link together 
the object files that make up the executable.  Since the linker script 
knows the layout of memory on the target board/simulator, it makes sense 
that the linker script should be responsible for the placement of the 
start of the stack.

Cheers
   Nick




More information about the Newlib mailing list