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


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]