[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Since the Dragonball processor can only make a relative jump if it is of a distance of 32K or less, it is only possible to jump arbitrarily within a code resource if that resource is at most 32K in size. With various heroic techniques, such as "jump islands", the processor's effective jump distance can be increased without limit, but this is not really worthwhile because resources are still limited to 64K by the HotSync protocol. Hence the best way to allow an application to have more than 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.1 Multiple code resources and global data But especially without globals 3.2 Breaking up an existing application
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |