Eugene Chin <[EMAIL PROTECTED]> wrote:
> Is it possible to change the size from 32767 bytes to 65000 bytes in
> pilot.ld? The linker complains that the section is full, and I was
> wondering if there are technical reasons for the limit.
You can try, but you'll start getting lots more linker errors.
Global data is referenced by the processor as a signed 16 bit offset
from an address register. Normally that register points to one end of
the block of memory, and only positive or only negative offsets are
available. Hence 32K is basically a hardware limit.
With a bit of hacking in the linker, you could arrange for the register
to point to the middle of the block, and then increase the size in
pilot.ld. You would need to use A4 (-mown-gp) because Palm OS expects
to find some of its own stuff on the other side of an application's A5.
Hmmm... actually that's an oversummary...
But the 32K limit is irrelevant because extant devices still only have
14K of dynamic heap available, right? (Well, that was definitely the
situation last time I was hacking in the linker :-))
The simple answer is of course: why do you have so many globals? It
can't *all* be vtables! Can't you access some of your global data
via MemPtrNew and pointers instead?
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/