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 / 3569
3568  |  3570
Subject: 
Re: Global Objects was Strange RCX startup issues
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 9 Dec 2003 22:53:51 GMT
Viewed: 
3901 times
  
Doh!  I think I just answered the question (of course it was After
hitting send)

Joseph Woolley wrote:
[snip]
> Also, I have a question (because of my limited knowledge of how the
> __ctors and __dtors are managed):  Would the two *for* loops in your
> sample code call the ctors and dtors for all global objects, regardless
> of which program they belong (assuming Task Management and Program
> Management is built)?  Would it be correct to validate that the function
> pointer is pointing to a function within the current program code before
> calling it?

So __ctors and __dtors are local to the program (address fix-up done by
genlds, etc...) ?  This way the __ctors are only for the current program.

To add automatic handling of the global objects (for the kernel built
with TM and PROGRAM) would require that dll send the address of __ctors,
__ctors_end, __dtors and __dtors_end to the Program Manager.

This seems possible, but not likely in the very near future.  Maybe I
can dig into it before January.

Mark, thanks for posting this code!
// Joe



Message has 1 Reply:
  Re: Global Objects was Strange RCX startup issues
 
(...) Yes. (...) Yes, I took a peek at the dll code and it looks like only one packet type would have to be extended to add this additional information. When not using the program manager (i.e. linking the user program directly to BrickOS), then (...) (21 years ago, 10-Dec-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Global Objects was Strange RCX startup issues
 
Mark, This is an interesting issue. Initially, after reading your post, I was thinking that it would be easy to add this support to BrickOS. Of course, this is only partially correct. For NON Task Manager builds (therefore no Program manager), it is (...) (21 years ago, 9-Dec-03, to lugnet.robotics.rcx.legos)

12 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
    

Custom Search

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