Whole document tree
    

Whole document tree

Using PRC-Tools: Accessing
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Accessing global data

How global data should be accessed depends on what you are building:

  • Depending on its launch code, a Palm OS application may or may not have access to its global data (see the Palm OS Reference manual). If global data is available, it is accessed via the A5 register (which points to the end of the global data).

  • A GLib accesses its global data via the A4 register.

  • A SysLib must set up global data in its Open vector if it wants any, and then can access it via A4.

  • A Hack has no global data. (But it could use similar tricks to a SysLib if it really wanted to.)

By default, or with `-mno-own-gp', compiled code will access global data via (a negative offset from) A5. Shared libraries and other special purpose programs should be compiled with `-mown-gp', and will use (a positive offset from) A4 (see see section 1.1 Palm OS-specific GCC options).



This document was generated by root on January, 30 2002 using texi2html