You need to redesign some of your function calls, ie. move them up within
your functions towards the function declaration. This is referred to as
"code pooling". This shortens the jumps a bit when you go to compile
and link your code.
Hope that helps!
-Rustin Daniel Nesse
Software Engineer, CNF Inc.
On 3/16/2001 at 9:38 AM Geoffrey Bonser wrote:
>I am porting a large existing code base to the Palm OS, it uses a fair
>amount of globals and a large amount of static data, around 80K when all is
>said & done. I have got it compiling and segmented, each segment has no
>more
>than 64K of code & data but when I go to link it I get the following
>errors:
>Link Error : __RuntimeModule__: Near data segment is bigger than 64k.
>
>Link Error : __RuntimeModule__: Near data segment is bigger than 64k.
>
>Link Error : PalmOS_GlobalDestructors.c: '__destroy_global_chain' 16-bit
>data reference to '__global_destructor_chain' is out of range.
>
>Link Error : PalmOS_Startup.c: '__Startup__' 16-bit data reference to
>'__exit_jmp_buf' is out of range.
>
>Link Error : PalmOS_Startup.c: '__LoadAndRelocate__' 16-bit data
>reference
>to '__segtable__' is out of range.
>
>Link Error : PalmDL.c: 'AppStart' 16-bit data reference to
>'b35NewFeatureSet' is out of range.
>
>... <goes on for a long time :>
>
>I am using CodeWarrior for Palm OS Release 7 running on Windows 2000
>Professional. The SDK is 3.5. The project settings in the 68K processor
>panel are Code Model:Large, Far Data:on, Far String Constants:on,
>PC-Relative Strings:off. According to the manual this should solve the near
>data problem but it obviously isn't. If I comment out the code to handle
>sysAppLaunchCmdNormalLaunch, it links successfully. I look at the map
>generated and all of the Code: items are in the first segment so that isn't
>the problem.
>
>Is there some way that I can get the project to link with that much static
>data or do I absolutely need to put it into resource files? I would like to
>avoid doing that if possible since this is an ongoing project with changes
>to the existing codebase that will need to be integrated into this port.
>However I suspect that putting into resources is the only way to get it to
>work, would someone please deny or confirm my suspicions?
>
>Thanks,
>
>-Geoff
>--
>Geoffrey Bonser
>Software Engineer
>Openwave
>[EMAIL PROTECTED]
>--
>Privacy and Confidentiality Notice: The information contained in this
>electronic mail message is intended for the named recipient(s) only. It may
>contain privileged and confidential information. If you are not an intended
>recipient, you must not copy, forward, distribute or take any action in
>reliance on it. If you have received this electronic mail message in error,
>please notify the sender immediately.
>
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/