So the library would have a 68k interface to the rest of the world, but it would call into a PNOlet to actually do the work, right?
And you're asking if you could call those PNOlet functions directly from a PNOlet in another program that's using the library? If I've read all that right, the answer's no, but possibly yes. The normal, easy to understand, sensible approach would be to pass pointers into your PNOlet that allow it to call the functions provided by your shared library - just as you would any other 68k routine that the PNOlet needed to access. Yes, that means you've got ARM code calling 68k code that calls 68k code, which then calls ARM code to do the work, and things get byteswapped and realigned several times along the way. Or - and this is a really big OR - you could choose not to use the shared library as a shared library. Doing this under Cobalt, which is multitasking and ARM-native probably wouldn't work. I'm talking strictly Garnet here... You could open the shared library resource database directly, retrieve the handle(s) to the ARM code resource(s) within it, allocate some feature memory, and load it as if it were your own PNOlet. If some other process is *also* using the library, this might be a bad idea. You'd need a way to return a list of function pointers that the library armlet provides, which you should be able to pass to your app's PNOlet, allowing it to directly call those functions without byteswapping and other such nonsense. I don't have any sample code I can share with you, unfortunately, since I've never tried this before - but I don't see any reason it wouldn't work. I know there are issues with globals in PNOlets built with gcc/PODS, and that might cause trouble, depending on whether you're using some tool or other to get around it, and how that tool works... It might be worth looking into anyway. Or you can use redundant layers of 68k accessor functions to keep things nice and neat, and to provide better encapsulation for your library functions, and to insure that future versions of the library continue to work with your application.... and so on. Brandon On Thu, 24 Feb 2005 18:44:06 -0000, Jonathan King <[EMAIL PROTECTED]> wrote: > In PODS, if I create a static library as a PNO project, will I be able to > call the functions directly from and ARMlet? Will the library be arm code? > -- > For information on using the Palm Developer Forums, or to unsubscribe, please > see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
