Thanks again.  It seems to me that the functions that make up the
application would all move around as a unit, and there appears to
be no problem calling a function at any given time.  So (to me) it
stands to reason that whatever method works for locating functions
should work for locating constant data (data in code space).

How do people make tables of function addresses (for instance) or
tables with addresses of anything (const)?

Sorry to burden you with this, but my structure eventually will
have pointers to other const structures (of different sizes, but all
defined at compile time) so this could get really ugly if I cannot
use pointers, but instead must create one big honking structure
(most of which would then be unused).

GB


"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:76139@palm-dev-forum...
>
> "GB" <[EMAIL PROTECTED]> wrote in message
> news:76135@palm-dev-forum...
> >
> > Thanks for the response.  Yes I have the pcrelconstdata pragma
> > on, and that helped somewhat, but the problem is that the array
> > length is variable, so I didn't want to chew up a bunch of space
> > by predefining the array length for the longest one, ... so I
> > included a pointer to an array instead.
> >
> > It seems to me that I can do this with just about every other
> > compiler/architecture I have run across (I'm from the embedded
> > world where const allows me to build structures in ROM).
>
> On embedded systems, your applications tend to be located at a specific
> address in memory.  On Palm OS, your code is in a resource which can be
> moved through memory by the operating system, and is not locked down to
> one location until it is executed.  When its locked, it doesn't have an
> opportunity to change the code, since the read-only section isn't being
> copied to another buffer, its being executed in place.




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

Reply via email to