This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How can I do calling for external address in my "C" programm by inline GAS?


Ian Lance Taylor wrote:
> In this code p_printf is the address of the printf function.  You are
> running your asm with the value of p_printf in %1.  Rather than putting
> the value into a register, you are putting the address of the value into
> a register.  In effect you are putting an address on the stack into the
> register.  Then you are calling that address, which implies calling into
> the stack.  This fails.
> 
> In order to get this kind of thing working, I recommend learning how to
> use the debugger, with single-stepping and display of assembly
> instructions.  That would make it clear that at the point of the call
> %rcx does not hold the address you want to call.
> 
> Ian


Hi Ian!

Thank you for you reply on my letters.

Your tips does not helped me.

I have registered this behavirous as bug: 
http://sourceware.org/bugzilla/show_bug.cgi?id=13903

-- 
The best Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]