This is the mail archive of the ecos-devel@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: Problems with C and Math libraries


On Tue, 2003-11-04 at 04:35, Pablo Huerta wrote:
> I'm using GNU assembler and linker version 2.11.93. Is this ok or I
> should use a newer version?
> 
> I want to ask you another question. I have written a simply program to
> test if the C and Math libraries are linked OK or not. It's attached as
> "test.c". If I compile it with the "-S" flag, to obtain the assembler
> file I can't see any call to "cyg_package_start", "cyg_iso_c_start",
> etc. But when compiled and linked completely, if I use eCos 1.3.1 the
> libc initializing functions are present (cyg_iso_c_start,
> cyg_libc_main_thread, etc), but if I use eCos 2.0 there are not
> present.Is it normal? Do I have to add something to the source file to
> indicate that it must use the C library initialization? In which stage,
> or how, does the linker realize that he must include the C library
> initializing routines?
> 

There should be a reference to "cyg_start" in your "vectors.S" which
is the key file that gets linked with the eCos kernel library.  This
reference in turn will call out to cyg_iso_c_start or 
cyg_libc_main_thread or whatever (albeit indirectly).

> I hope I'm not boring you with such a lot of questions, but I have been
> working on it a long time and I'm a bit desperated :-(
> 
> Thanks a lot,
> 
> Pablo Huerta
> 
> 
> 
> El mar, 04-11-2003 a las 11:57, Andrew Lunn escribió:
> > On Tue, Nov 04, 2003 at 11:16:07AM +0100, Pablo Huerta wrote:
> > > First of all, thanks for your answer.
> > > 
> > > The target is OpenRISC 1000 architecture.
> > 
> > > I attach the file export.out with an export with the minimal
> > > configuration.
> > 
> > I just tried your configuration on the synth target by just changing
> > the HAL packages. It worked fine.
> > 
> > > 
> > > About a possible compiler problem, I have already thinked about it, and
> > > with GCC versions 3.3.1 and 3.4 it's possible that the compiler is not
> > > 100% accurate, but the port of version 2.95.3 has been deeply tested
> > > with ecos 1.3.1 and other aplications and it seems to work 100% OK.
> > 
> > What binutils are you using. It could be a linker problem as well. You
> > need to find out why the linker is throwing out the constructor. 
> > 
> >      Andrew
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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