Hello again

This might be another way around: create a project without multigen.
In this case you don't need to specify section in the source code at
all !

You just build an ld-script, and use 'man-made' stubs, when needed.
I did it for my first program and it was not so bad, but I have a
feeling that the stubs can be written in a more professional way.

What I have for a stub is smth like:

        extern Boolean RealFoo(UInt32 arg);

        Boolean  StubFoo (UInt32 arg)
        {
                return RealFoo(arg);
        }

Being aware of a stack problem and preformance issue, I used
stubs only for rerely used functions which take not more than
one argument.

What I was looking for, is having a stub that will just 'kick'
the call without shifting stack. For that reason I rewrote
the above stub in assembler:

        .even
        .globl StubFoo
StubFoo:
        jmp.l RealFoo

With assembler stub it compiled and linked OK.
but crashed, giving smth like non-even address in pose.
Can you tell me what is wrong with that code ?

BTW, should I declare RealFoo in assember as external ?
Since it compiled without error, this should'nt be a problem.

Michael

 

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