From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32613 invoked by alias); 5 Feb 2012 06:31:07 -0000 Received: (qmail 32564 invoked by uid 22791); 5 Feb 2012 06:31:05 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f41.google.com (HELO mail-lpp01m010-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 05 Feb 2012 06:30:50 +0000 Received: by lamf4 with SMTP id f4so2935812lam.0 for ; Sat, 04 Feb 2012 22:30:49 -0800 (PST) Received: by 10.152.114.169 with SMTP id jh9mr6827601lab.20.1328423449265; Sat, 04 Feb 2012 22:30:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.5.201 with HTTP; Sat, 4 Feb 2012 22:30:19 -0800 (PST) In-Reply-To: References: From: Khem Raj Date: Sun, 05 Feb 2012 06:31:00 -0000 Message-ID: Subject: Re: Barebones toolchain multiple definition of `_start' To: David Wuertele Cc: crossgcc@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00046.txt.bz2 On Sat, Feb 4, 2012 at 8:27 PM, David Wuertele wrote: > Nvidia's Tegra PDK comes with a toolchain from CodeSourcery for > building their bootloader. =C2=A0gcc --version reports: > > =C2=A0arm-none-eabi-gcc (Sourcery G++ Lite 2009q3-68) 4.4.1 > > The CodeSourcery toolchain works fine. =C2=A0But I wanted to try ct-ng. > I used menuconfig to set up a barebones toolchain and built it. > I've attached .config.2. =C2=A0 gcc --version reports: > > =C2=A0arm-crosstool-eabi-gcc (crosstool-NG 1.14.0) 4.4.6 > > I specified the toolchain to the bootloader > makefile, and all seemed to work, except for the final link: > > $X_TOOLS/arm-crosstool-eabi/bin/arm-crosstool-eabi-gcc > -Wl,-Tmake/cop.ldscript -Wl,-Map=3D_out/debug_p852/images/cop_stage1.map > -L$X_TOOLS/arm-crosstool-eabi/arm-crosstool-eabi/sysroot/lib/armv4t > arch/tegra2/core/_out/debug_p852_cop_stage1/cop_init.o > ${STAGE2_FILES_OUT} -Wl,--whole-archive > arch/tegra2/core/_out/debug_p852_cop_stage1/libtegra2core.a > (lots more .a files skipped for brevity) > -Wl,--no-whole-archive -Wl,--gc-sections -o > _out/debug_p852/images/cop_stage; > pass -nostartfiles -nodefaultlibs to link step > arch/tegra2/core/_out/debug_p852_cop_stage1/cop_init.o: In function > `_start': cop_init.c:(.startup+0x0): multiple definition of `_start' > $X_TOOLS/arm-crosstool-eabi/lib/gcc/arm-crosstool-eabi/4.4.6/../../../../ > arm-crosstool-eabi/lib/crt0.o:$CROSSTOOL/.build/src/newlib-1.17.0/libglos= s/arm/crt0.S:83: > first defined here > $X_TOOLS/arm-crosstool-eabi/lib/gcc/arm-crosstool-eabi/4.4.6/../../../../ > arm-crosstool-eabi/lib/crt0.o: > In function `start': (.text+0xe0): undefined reference to `main' > $X_TOOLS/arm-crosstool-eabi/lib/gcc/arm-crosstool-eabi/4.4.6/../../../../ > arm-crosstool-eabi/lib/libc.a(lib_a-exit.o): > In function `exit': > $CROSSTOOL/.build/src/newlib-1.17.0/newlib/libc/stdlib/exit.c:65: > undefined reference to `_exit' > $X_TOOLS/arm-crosstool-eabi/lib/gcc/arm-crosstool-eabi/4.4.6/../../../../ > arm-crosstool-eabi/lib/libc.a(lib_a-sbrkr.o): > In function `_sbrk_r': > $CROSSTOOL/.build/src/newlib-1.17.0/newlib/libc/reent/sbrkr.c:60: > undefined reference to `_sbrk' collect2: ld returned 1 exit status > > The only thing I changed was the toolchain. =C2=A0Why would the ct-ng > toolchain have this problem while CodeSourcery does not? > > Dave > > -- > For unsubscribe information see http://sourceware.org/lists.html#faq -- For unsubscribe information see http://sourceware.org/lists.html#faq