At 10:00 2003-2-10 +0000, you wrote:
Ben Combee wrote:
If you can't arrange the order of functions in your library to make it link with small, then switching to large or smart is appropriate, but otherwise, small is preferred due to the smaller code size.
Ben, I didn't realise that it is possible to use large or smart with shared libraries.

Whenever I try, I get loads of link errors because the entries in the dispatch table are only 16 bit.
You can rearrange the file order in your shared library to move the dispatch table to a more centered location. If its in the middle of your library, you should have the full 64K range available for the table.

From this I take it that it is only possible to have any "exported" functions in the first segment with internal functions in the other segment?
You still can't do multisegment libraries easily. There is no jump table generated for a shared library, so code in other segments can only be reached by manually locking those segments in memory and jumping into them, taking care to order those segments right and being sure to jump over the 12-byte segment leader. It is not for the faint of heart.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com

--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/


Reply via email to