This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug inline-asm/41422] incorrect code generated with asm function pointers when compiled with -fPIC on x84_64



------- Comment #2 from scott dot gccbugs dot 2009 at scottrix dot co dot uk  2009-09-21 06:25 -------
I have changed 

extern void my_asm_func(void);

to

static void my_asm_func(void);

This gives me a warning:

a.c:3: warning: 'my_asm_func' used but never defined

and still produces incorrect code, as before.

I am more than happy to accept that this is an assembler problem (it's not the
linker since the problem is in the .o file.)  How do I generate the code that
you gave ? (movq    my_asm_func@GOTPCREL(%rip), %rsi)

thanks...


-- 

scott dot gccbugs dot 2009 at scottrix dot co dot uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41422


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