undefined reference to `end'in function _sbrk

Toshi Morita tm2@best.com
Mon Apr 2 13:14:00 GMT 2001


mrburns@tiscalinet.it wrote:

>When I try to compile the 'program':
> 
> main()
> {}
> 
> I get the following error:
> /usr/local/arm-v4t-aout/lib/crt0.o(.text+0xd4): undefined reference to
> `_bss_start__'
> /usr/local/arm-v4t-aout/lib/crt0.o(.text+0xd8): undefined reference to
> `_bss_end__'
> /usr/local/arm-v4t-aout/lib/libc.a(syscalls.o): In function `_sbrk':
> /home/marco/tesi/newlib/build/arm-v4t-aout/newlib/libc/sys/arm/../../../../../..
> /source/newlib-1.9.0/newlib/libc/sys/arm/syscalls.c:496: undefined
> reference to `end'
> collect2: ld returned 1 exit status
> 
> ...where's my mistake?

_end needs to be defined in your linker script somewhere.

Try grepping in the ld linker scripts to see an example.

Toshi



More information about the Newlib mailing list