This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/41422] incorrect code generated with asm function pointers when compiled with -fPIC on x84_64
- From: "scott dot gccbugs dot 2009 at scottrix dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Sep 2009 06:25:45 -0000
- Subject: [Bug inline-asm/41422] incorrect code generated with asm function pointers when compiled with -fPIC on x84_64
- References: <bug-41422-18213@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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