LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

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


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

Code:
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

Code:
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,
Fairuz
 
  


Reply


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 LinuxQuestions.org 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 arm-elf-tools-20030314.sh blueskyhff Linux - Software 0 03-26-2007 01:44 AM
ncurses for arm-elf Juanfran Programming 4 09-19-2005 09:43 AM


All times are GMT -5. The time now is 02:49 PM.

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