This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: Linking problems


Hello Daniel,

> I get the below error when i am building my EB40 application. What does
the
> linker mean with the "end"? When i check which file it is that wants to
use
> the expression then it says that it shall be defined by the linker....???
> (look below). Where is the "end" variable supposed to be located?
>
> /Daniel
>
> ------error output-----
> /src/newlib/arm-elf/newlib/libc/libc.a(syscalls.o): In function `_sbrk':
> /src/newlib/newlib-1.9.0/newlib/libc/sys/arm/syscalls.c:496: undefined
> reference to `end'
> -----------------------
>
>
> ----from file syscalls.c------
> caddr_t
> _sbrk (int incr)
> {
>   extern char   end asm ("end"); /* Defined by the linker.  */

The "end" symbol is usually defined in the linker script at the end of your
data and bss sections (and any other sections that you have defined). sbrk
assumes that the heap begins at this memory location. You can find more
information on this (and lots of other handy information) in the "porting"
doc found in libgloss/doc in the newlib tree.

HTH. Good luck.

MKE


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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