This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Linking problem
- From: Billy <billy at DaDaDaDa dot net>
- To: "Meulendijks, J." <Meulendijks at WT dot TNO dot NL>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 23 Sep 2004 08:04:39 -0400
- Subject: Re: [ECOS] Linking problem
- References: <6B80E71673E6D611AC1D0008C7F37BC203F8E5D9@wt15.wt.tno.nl>
On Thu, Sep 23, 2004 at 10:11:40AM +0200, Meulendijks, J. wrote:
> When I try to link my application I get the following output:
> .\obj/twothreads.o: In function `cyg_user_start':
> /ecos-c/eCos-Work/Test/untitled_single_gnu_TNO_rtw/twothreads.c:27: undefined reference to `cyg_mutex_init'
> /ecos-c/eCos-Work/Test/untitled_single_gnu_TNO_rtw/twothreads.c:27: relocation truncated to fit: R_PPC_REL24 cyg_mutex_init
...
> make: *** [.\output/ram.elf] Error 1
> make: Leaving directory `/ecos-c/eCos-Work/Test/untitled_single_gnu_TNO_rtw'
> Finished
>
> In my opinion the linker is missing libraries (libgcc.a libsupc++.a)
That's not what it looks like to me.
Missing libraries should be straight and simple undefined references
of symbols from -lgcc or -lsupc++, which isn't what you're seeing.
Something more wicked is happening... see below for my hypothesis.
> but I use the GROUP(libtarget.a libgcc.a libsupc++.a) in my
> linkerscript. So I don't understand why it cannot find these
> libraries. Does anyone have any suggestions?
We saw something like this for ARM. It was because we had a Makefile
bug which resulted in linking a library built for PC with my ARM app.
And the error we got looked a lot like what you have. So check the
architecture of all of the libraries you're linking, and make
sure they're all compatible.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss