Re: Runtime libraries Link issue
re: Is there a reason you can't make your application multi-segment? Not really. I'm just trying to keep it as small as possible, and therefore didn't want to add the overhead of the segment manager library routines. After I posted my question, I determined what was causing the call to _lmul_. It was SysQSort and SysBinarySearch, which both return a found position value as a UInt32. I had returned the address of the table element to the calling function by using table[position]. So, it invoked the long multiply. I simply changed that to: localUInt16 = position; return (table[localUInt16]); It seems strange that the return from those two system routines is a UInt32 when the maximum number of entries is a UInt16. Whatever ... assigning the UInt32 to a UInt16 took care of my immediate link problem of not being able to access the long divide library routine. As the old saying goes ... if it hurts when you do that ... don't do that !! I'll keep your suggestion for using the compiler library source code to position needed routines in the middle of the application code in mind just in case I need it later on. The applications I build generally don't get very large because of all the magic I do on behalf of the application in my own library routines, which I can now access from anywhere thanks to the Jump table I recently implemented. Regards, Terry -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Runtime libraries Link issue
To stay within the 32K jump limits of Small Model applications, I implemented a Jump table to all the static runtime library routines that need to be accessed by application code. And, I positioned my library at the end of my application Segments so more application code will be able to fit within the first 64K. My problem is that the compiler runtime routines are linked in following Startup.lib, so any routines that are more than 32K away from the application base address can't access the compiler routines (like, _lmul_ , etc.). That includes application code and my library code. Is there a way to position those library routines? Or, any other routines, for that matter. Yes, I know I can position specific modules in a given sequence in the Segments definition. But, I'm looking for a way to design the layout instead of just playing trial and error until it links properly. Perhaps there is some linkage editor documentation that isn't readily apparent? Any suggestions on how to access those library routines from my library if/when the application code grows to near 64K? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/