IMHO:   Allocate some space in heap large enough for your static lib
globals.
Switch A4 to poit into heap bottom every time you call static library and
restore it back on return.
Should not be a big issue I guess.
--


"Alan Ingleby" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Bear with me...  This is an interesting, and (I think) fairly unique
issue.
>
> In my shared library, I link to code from a static library.  Normally this
> would not be a problem, but the code in the static library uses globals.
> Using globals in a shared library is normally a no-no, but can be worked
> around by various means (tinkering with the A4 register and so forth).
The
> problem lies in the fact that I only have the object code of the static
> library, so I can't change it.  Another problem is that a "libr" code
> resource has it's globals referenced using A4, whereas normal apps
> (including the internals of this static library) use A5.
>
> Can I get this static library to be usable, and how?
>
> Alan
>
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to