From: | Rudi Chiarito |
Date: | 21 Aug 2000 at 13:44:15 |
Subject: | Re: AMIOPEN: Retooling existing applications |
On Sun, Aug 20, 2000 at 01:21:07PM +1200, Jarno van der Linden wrote:
> Why can't non-primary tools use globals?
They can. You might want to check C shared libraries. You can try giving
a look at /lang/cc/doc/dynamic.html, if I'm not mistaken.
> I can see a fairly
> easy solution
> at the compiler/assembler level: pass the global pointer to
> the tool and
> insert as the first instruction a "cpy.p p<global>, gp". The
> VP2.1 docs
> explicitely allows such setting of the gp as long as the
> value points to
> a global data area.
The "global data area" is a structure setup by the kernel, not a
user memory area.
Also the Quick Reference Guide (P32) says "Do not .. modify special
registers."