At 10:48 AM 3/7/2005, you wrote:
Thank you Ben for your quick response. Well, based on your earlier respose, I wonder how the linker works with a static library then. When the linker does not find anything (i mean function body) but the function prototypes, does it assume that the functions are in a shared library and they have to be linked dynamically? I am sorry for bothering you this way, but I didn't find enough resources anywhere on this issue.

Read my article on shared libraries at http://palmos.combee.net/blog/C++and68KSharedLibrariesD.html


A Palm OS shared library is a separate chunk of code. You lock it in memory and jump to the start of the code, which by convention is an installation routine -- the library registers itself with the OS and tells it where the library dispatch table is.

A call to a shared library is just like an OS call -- it's a special TRAP instruction. The OS uses the first parameter to determine what library is called, then jumps into the library code. If the library isn't loaded, the call will fail at runtime because you won't have a valid library reference to put in the first parameter.

-- Ben Combee, Senior Software Engineer, palmOne, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Forum Archives:   http://news.palmos.com/read/all_forums/


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

Reply via email to