From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27837 invoked by alias); 28 Oct 2010 14:06:48 -0000 Received: (qmail 27828 invoked by uid 22791); 28 Oct 2010 14:06:47 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm28-vm1.bullet.mail.sp2.yahoo.com (HELO nm28-vm1.bullet.mail.sp2.yahoo.com) (98.139.91.235) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 28 Oct 2010 14:06:41 +0000 Received: from [98.139.91.68] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 28 Oct 2010 14:06:40 -0000 Received: from [98.139.91.20] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 28 Oct 2010 14:06:40 -0000 Received: from [127.0.0.1] by omp1020.mail.sp2.yahoo.com with NNFMP; 28 Oct 2010 14:06:40 -0000 Received: (qmail 59233 invoked by uid 60001); 28 Oct 2010 14:06:40 -0000 Message-ID: <876325.58501.qm@web112502.mail.gq1.yahoo.com> Received: from [123.237.140.102] by web112502.mail.gq1.yahoo.com via HTTP; Thu, 28 Oct 2010 07:06:39 PDT References: <877394.75835.qm@web112505.mail.gq1.yahoo.com> <201010281311.38430.pedro@codesourcery.com> <816234.36806.qm@web112518.mail.gq1.yahoo.com> <201010281411.37353.pedro@codesourcery.com> Date: Thu, 28 Oct 2010 14:06:00 -0000 From: paawan oza Subject: Re: gdb cross compilation, error from gdb/tui module To: Pedro Alves Cc: Baurzhan Ismagulov , gdb@sourceware.org In-Reply-To: <201010281411.37353.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00125.txt.bz2 but it is bare metal tool chain, I tried to compile sample application with that but got linker error as follows. /home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-eabi-gcc -g ./test.c /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008018 /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r': sbrkr.c:(.text+0x18): undefined reference to `_sbrk' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): In function `_write_r': writer.c:(.text+0x20): undefined reference to `_write' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): In function `_close_r': closer.c:(.text+0x18): undefined reference to `_close' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): In function `_fstat_r': fstatr.c:(.text+0x1c): undefined reference to `_fstat' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): In function `_isatty_r': isattyr.c:(.text+0x18): undefined reference to `_isatty' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): In function `_lseek_r': lseekr.c:(.text+0x20): undefined reference to `_lseek' /home/oza/mk_patch/packages/arm-2009q3/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): In function `_read_r': readr.c:(.text+0x20): undefined reference to `_read' collect2: ld returned 1 exit status 8 ----- Original Message ---- From: Pedro Alves To: paawan oza Cc: Baurzhan Ismagulov ; gdb@sourceware.org Sent: Thu, October 28, 2010 6:41:37 PM Subject: Re: gdb cross compilation, error from gdb/tui module On Thursday 28 October 2010 13:46:41, paawan oza wrote: > same results with arm-eabi ... > linux-ghot:/home/oza/mk_patch/gdb/gdb-7.2/gdb # arm-none-linux-gnueabi-gcc -g ... But I suggested: "I suppose you'll get better results with a compiler that matches your target..." "... and to use the arm-eabi compiler, not the arm-linux-gnueabi compiler." -- Pedro Alves