At 6:56 AM +0000 1999/12/06, Per Brown wrote:
>I am using a 3rd party library that is loading all its functions into 1
>segment. This segment has just gone over the 64K boundry. Is there a
>pragma statement that can be used to force functions into different
>segments. I dont have access to the library source.

I'm not sure if you're talking about shared or static libraries, so I'll address each 
separately:

Multi-segment shared libraries are not supported on the Palm OS for the same reasons 
that A5-based library globals and C++ style vtables are not supported. You [the 
library developer] can manually implement the segment loading and unloading yourself, 
but it's non-trivial.

Static libraries remove the above restrictions, but link all the code directly into 
your application. I'm not certain if the segment pragmas can be defined around the 
library's header file prototypes or not... segment pragmas are rarely compatible with 
other compilers in any case. You might also consider breaking up the library into two 
or more components, since static libs are really little more than big chunks of 
compiled object code.

In any case, no tool exists of which I'm aware that can de-compile and re-segment an 
existing library or application, and then glue it back together again with new segment 
management. As you may already know, any code with a segment over 64k may run into 
HotSync problems. So the practical solution, most likely, is to restructure the 
library from within the sources.

Regards,

Jim Schram
3Com/Palm Computing
Partner Engineering 


Reply via email to