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: undefined reference to `end'in function _sbrk


You need ld script. 
ld script has those symbols. 
For example, ld script for mn10300 gcc compiler is
sim.ld. 

Usually ld script has "ld" file extension. 

--- Marco <marco.marcello@tin.it> wrote:
> 
> 
> Hi, I am installing on my i586 running a Linux
> Mandrake 7.2 a gcc
> cross-compiler for Arm processor;
> I configure gcc with the following options:
>   --target=arm-v4t-aout
>   --with-gnu-as
>   --with-gnu-ld
>   --disable-threads
>   --with-newlib
>   --with-headers=/usr/local/arm-v4t-aout/include
> 
> and I install it in the default directory /usr/local
> Then I configure newlib with the option 
>   --target=arm-v4t-aout
> and install it in /usr/local ,too.
> 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?
> Thanks in advance, 
>   Marco Marcello
> 
> ------
> Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

------
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]