To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1799
1798  |  1800
Subject: 
Re: Library use in LegOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 27 Mar 2001 12:16:30 GMT
Viewed: 
3736 times
  
In lugnet.robotics.rcx.legos, Jakob Engblom writes:
> > Each program gets it's own copy
> 
> OK.
> 
> How are the calls to the kernel resolved? By the makelx program, or by some
> magical stuff in the linking.
> 
> I can imagine compiling the kernel, getting a symbol table out, and then
> when compiling user programs, you use a linker DEFINE or such to tell the
> code that yes, there is such a function, at this absolute address.  However,
> getting this to work automatically seems like a lot of work.

Not sure of the details, but the linker takes the .o file, and the symbol file
LegOS.lds, created during the kernel compile, and produces two files; .ds1 &
.ds2, which are then passed to makelx to produce the lx file. So it seems the
linker resolves kernel symbols, not makelx.

> > > If I would use a different compiler, with a different set of libraries for
> > > the program and the kernel, is there the potential for namn clashes?
> > 
> > Hmmmm. Not sure. Wish I knew more about compiler internals...
> 
> Well, if each program uses its own libraries, there is no risk.  The linked
> binary from my compiler will call LegOS via some mechanism, and its own
> libraries internally in the binary.  No problem.
> 
> > > How much of the LegOS-gcc standard libraires come from gcc and how much • have
> > > been hacked specifically for legos?
> > 
> > It's all custom written - doesn't use the standard gcc libraries at all. In
> > fact when building the cross compiler, you have to tell it to forget about
> > the standard libraries.
> 
> Why is that?  For the IAR compiler we are going to use, the libraries are
> completely operating-system neutral (strlen, memcpy, math libs, etc have
> nothing to do with the operating system).

I think it's mainly for size - but I wasn't involved with the early versions of
LegOS, so maybe someone else knows more...

I guess libc could also be used for the H8 but I don't know if anyones tried
this.

> Lots of questions, but I am trying what apparently nobody has tried before,
> since I only have seen gcc discussed here in the legOS forum.



Message has 1 Reply:
  Re: Library use in LegOS
 
(...) of (...) For the IAR compiler, this should not a problem. The libraries are optimized for minimal size, so we can probably use the standard libraires. And give our students the benefit of a full C lib. /jakob (25 years ago, 28-Mar-01, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Library use in LegOS
 
(...) OK. How are the calls to the kernel resolved? By the makelx program, or by some magical stuff in the linking. I can imagine compiling the kernel, getting a symbol table out, and then when compiling user programs, you use a linker DEFINE or (...) (26 years ago, 27-Mar-01, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR