[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Theoretically, the heroics required to make functions calls over a distance of more than 32K are applicable for an arbitrarily large code resource. Unfortunately each resource is still limited to only 64K by the HotSync protocol, at least on Palm OS versions up to and including Palm OS 4.1. Thus the gain compared to a hassle-free 32K code resource is not great, and the best way to allow an application to increase beyond 32K of code is to allow it to have multiple separate code resources.
One simple technique for producing multiple code resources is to map
distinct GCC code sections into distinct Palm OS code resources. This
version of prc-tools implements a limited form of that: functions may
be marked as being in particular sections via the standard GCC
section
attribute (see section `Declaring Attributes of Functions' in Using and Porting GCC).
(These markings are used quite early in the compiler, so other ways of putting
functions into different sections, such as -ffunction-sections
and rearrangements at link time, don't work.)
A project definition file (see section 4. Definition files) must be used, with
a multiple code clause to inform build-prc
of the new sections.
You also need to define the pointer variables mentioned above in an
assembly language stub file linked into your executable, and should use
a linker script to place the new sections at appropriate addresses.
The easiest way to do these things is to use multigen
to generate
them from the same definition file clause (see section 6.2 multigen).
3.2.1 Multiple code resources and global data But especially without globals 3.2.2 Breaking up an existing application
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |