This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]