On Wed, May 17, 2000 at 11:38:29AM -0400, Thomas Ward wrote:
> Hi!
> 
> I'm writing a hack that is going to patch two different system traps. Both
> of these patches need to call a common subroutine, which is pretty large, so
> I don't want to have 2 copies in my code.
> 
> With the way hacks are compiled (using GCC), is there a way to have some
> shared code? If so, what would I have to change in the following makefile so
> that it would work correctly?:

Hack routine 1: normal

Hack routine 2:

hackhelp.s-----------------

 .globl hack2ent
hack2ent:
 jmp hack1ent
 .end

Or something like this.  With PC relative addressing you may need
hackent1(pc); you may also be able to simply alias the common entry
point with an asm or some gcc directive.

-- 
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