This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: _sbrk: undefined reference to `end' problem


Interesting. We chose to do this with a weak symbol from a
platform-specific runtime library, in order to allow the application to
override the selection. Same idea, and the linker script could probably
export a weak symbol if desired.



On Wed, 2008-05-28 at 09:01 +0100, Nick Clifton wrote:
> 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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]