Subject:
|
Re: Global Objects was Strange RCX startup issues
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Thu, 11 Dec 2003 17:14:45 GMT
|
Viewed:
|
4113 times
|
| |
| |
Mark Riley wrote:
> In lugnet.robotics.rcx.legos, Joseph Woolley wrote:
[snipped]
>
> > 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.
>
>
> 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 some simple loops like in my example should do the trick.
I simply added ctor_size and dtor_size to the *image*, *lx* and
*program* structures. This allows the program manager to calc the start
and end of these segments.
>
> > This seems possible, but not likely in the very near future. Maybe I
> > can dig into it before January.
>
> That would be great, Joe, if you could find the time. I know I've shyed away
> from using C++ with BrickOS because of this problem. (Too lazy to fix it, I
> guess! :-)
It wasn't as hard as I had thought. I have the fix working, but need to
clean it up a bit (and do some more testing)
Question: Should this be an OPTION in config.h or a permanent update?
Currently, I #ifdef'd all the code, but it seems like a reasonable piece
of code and doesn't add much to the size of the kernel.
// Joe
|
|
Message has 1 Reply:
Message is in Reply To:
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
|
|
|
|