Hi Alexander,

>I readed your article "PalmOS Shared-Library Globals". But I creating a
>shared library on the basis of regular apps.

I'm not sure what you mean by this. Are you creating a combined 
app/shared library? Or do you want to create an app that uses 
A4-globals?

>With a bit of hacking on the
>Metrowerks startup code i get global data, but i need to force compiler to
>generate code using for the reference to global data a register A4 instead
>of A5 (Mainly this necessary for initialize creating C++ objects reference
>to VTBL ). It's possible?

I believe so, but with a fair amount of work. I think you'd need to 
create a project to build a multi-segment Mac code resource, then use 
a prefix file to define __PALMOS_TRAPS__ to be 1. After that, you'd 
have to modify the startup code to correctly initialize globals 
(similar to what I did for globals in a shared library). If you want 
to support multiple segments, then it gets more difficult. At some 
point you might want to look at GCC's support for A4-based globals, 
since I believe it's more sophisticated and easier to modify if it 
doesn't do exactly what you want.

-- Ken

>  > -----Original Message-----
>  > From: Ken Krugler [mailto:[EMAIL PROTECTED]]
>  > Sent: Thursday, May 17, 2001 1:36 AM
>  > To: [EMAIL PROTECTED]
>  > Cc: [EMAIL PROTECTED]
>  > Subject: Re: A4 instead of A5
>  >
>  >
>  > >Is it possible to force the compiler CW6 to use for the
>  > reference to global
>  > >data a register A4 instead of A5?
>  >
>  > If you're creating a shared library, then yes it's possible. With a
>  > bit of hacking on the Metrowerks startup code you could probably also
>  > make it work for regular apps.
>  >
>  > -- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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

Reply via email to