From: Indraneel <indraneel.m@samsung.com>
To: balrogg@gmail.com
Cc: Madhava Gauranga <Madhava.Gauranga@ittiam.com>,
Linux-omap-open-source@linux.omap.com
Subject: Re: Problem in linking with montavista toolchain for omap2420
Date: Wed, 31 Jan 2007 16:50:48 +0530 [thread overview]
Message-ID: <1170242448.4387.42.camel@localhost.localdomain> (raw)
In-Reply-To: <fb249edb0701300655t50b86cc0g1cf00284a62bf44f@mail.gmail.com>
Hello Andrew,
On Tue, 2007-01-30 at 15:55 +0100, andrzej zaborowski wrote:
> Hi,
>
> On 30/01/07, Indraneel <indraneel.m@samsung.com> wrote:
> > LDFLAGS= -nostdlib -L/opt/montavista/devkit/arm/v5t_le/target/usr/lib
> > -L/opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1 -L/opt/montavista/devkit/arm/v5t_le/armv5tl-hardhat-linux/lib
> >
> > With this i am past the previous error and the new error is
> >
> > /opt/montavista/devkit/arm/v5t_le/lib/gcc-lib/armv5tl-hardhat-linux/3.3.1/../../../../armv5tl-hardhat-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008074
> > /tmp/cc0VA6xr.o(.text+0x8): In function `main':
> > : undefined reference to `puts'
> > collect2: ld returned 1 exit status
> >
> > I guess it's something to do with path but i'm not sure what exactly.
>
> These function (puts, _start) are part of the C library, which you
> disabled by passing -nostdlib so it's understandable that the linker
> is not finding them.
>
> Personally I'd just try a different toolchain. Tools like "scratchbox"
> or "crosstool" or Gentoo's "crossdev" make it particularly easy to
> compile a working toolchain. You can also build it using only bare
> gcc, binutils and glibc/uclibc sources.
The tool chain should be okay as i'm "able to build and run the kernel"
using the same montavista v5t_le toolchain. But surprisingly i'm unable
to build a simple application binary using the same. I'm giving the
-nostdlib option so that it doesn't pick C libs from the host. The path
to the libs is provided in the -L option. Correct me if my understanding
is wrong.
It should be a matter of giving the correct compiler/linker options to
build the code but i haven't been able to figure that out till now.
If somebody is using the montavista v5t_le toolchain (for TI's H4
board), please let me know the options to compile and link a simple
HelloWorld program.
Other info
gcc
version 3.3.1 (MontaVista 3.3.1-7.0.15.0500230 2005-02-20)
--with-sysroot=/opt/montavista/devkit/arm/v5t_le/target
GNU ld
version 2.14 20030612 (MontaVista 2.14-11.0.7.0500230 2005-02-20)
PATH=/opt/montavista/devkit/arm/v5t_le/bin:$PATH (i keep the toolchain
here)
Regards,
Indraneel
>
> If you have libc.so but not libc.so.6 try symlinking libc.so.6 ->
> libc.so (not guarranted to work but may help, maybe someone forgot to
> pack the link).
>
> Regards,
> Andrew
>
>
prev parent reply other threads:[~2007-01-31 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-28 11:53 Problem in linking with montavista toolchain for omap2420 Indraneel
2007-01-30 6:16 ` Madhava Gauranga
2007-01-30 11:25 ` Indraneel
2007-01-30 14:55 ` andrzej zaborowski
2007-01-31 11:20 ` Indraneel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1170242448.4387.42.camel@localhost.localdomain \
--to=indraneel.m@samsung.com \
--cc=Linux-omap-open-source@linux.omap.com \
--cc=Madhava.Gauranga@ittiam.com \
--cc=balrogg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox