"Eugene Mayevski" <[EMAIL PROTECTED]> wrote in message
news:76075@palm-dev-forum...
>
> Hello!
>
> CodeWarrior has a pragma #pcrelconstdata. It works for constants but
for
> some reason doesn't work for virtual method tables in CodeWarrior 7.
This
> prevents putting classes with virtual methods to shared libraries, and
this
> is a big problem in some cases.
> Does CodeWarrior 8 solve this problem in any way? Or maybe PRC tools
will
> let me generate a shared library with VMTs?

A virtual table isn't constant.  It has pointers that point to different
locations depending on where the program has been moved in memory.  If
it was placed in the PC-relative data area, we couldn't change the
pointers to go to the right location at runtime.

In CW for Palm OS V8, we implemented expanded mode that moves the
virtual tables into an separate section allocated in the storage heap.
This only works for applications right now, but we'd like to extend this
to shared libraries.  Right now, you can use expanded mode to get
virtual tables on non-global application launches, but we don't have the
runtime library support to do this for shared libs.



-- 
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