Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-05-2010, 06:17 AM   #1
LQ Newbie
Registered: Jun 2010
Posts: 10

Rep: Reputation: 0
arm-elf-gcc _sbrk errors

I tried to compile an empty main function (just to test the toolchain) but i got these errors.

fairuz@ubuntu:~/test$ arm-elf-gcc -mcpu=arm7tdmi-s test.c
/opt/gnuarm/lib/gcc/arm-elf/4.4.1/../../../../arm-elf/lib/libc.a(lib_a-exit.o): In function `exit':
/home/fairuz/build-newlib/arm-elf/newlib/libc/stdlib/../../../../../newlib-1.17.0/newlib/libc/stdlib/exit.c:65: undefined reference to `_exit'
/opt/gnuarm/lib/gcc/arm-elf/4.4.1/../../../../arm-elf/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
/home/fairuz/build-newlib/arm-elf/newlib/libc/reent/../../../../../newlib-1.17.0/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
collect2: ld returned 1 exit status
This is my main

void main (void){}
I compile my own toolchain using gcc 4.4.1, binutils 2.19.1, newlib 1.17, GDB 6.8, insight 6.8-1

I've read somewhere that this kind of error is caused by newlib syscall and they suggest to add --disable-newlib-supplied-syscalls option when compiling newlib. I've did this but I still got the same errors.

Anyone have some ideas on this matter?

Thanks for your time,

Kind regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
uClinux ARM-ELF Toolchain Building Procedure vinchipsathya Linux - Newbie 1 11-02-2009 07:28 PM
Arm elf gcc jotagallo Member Intro 0 04-22-2009 03:32 PM
Compile the linux2.6.14.1 for arm must ues the arm-linux-gcc-3.4.4? frankyue Linux - Embedded & Single-board computer 2 12-20-2008 08:28 AM
ask for uClinux-dist-20040408.tar.gz and blueskyhff Linux - Software 0 03-26-2007 01:44 AM
ncurses for arm-elf Juanfran Programming 4 09-19-2005 09:43 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration