Christoph Egger
2006-Nov-30 10:31 UTC
[Xen-devel] [PATCH] Bugfix: Don''t use function pointers to inline functions
Hi! There''s code, which use inline functions on function pointers. This is IMO a bug. The issue has been found by gcc 4.1.1 on Gentoo Linux when compiling a x86_64 hypervisor with -O0. gcc link error messages are attached. The xen_shadow.diff patch fixes the issue. Further, I had to move vmx_update_host_cr3() from xen/include/asm-x86/hvm/vmx/vmx.h to xen/arch/x86/hvm/vmx/vmx.c or gcc complains in xen/arch/x86/hvm/vmx/io.c that "vmx_update_host_cr3() is defined but not used" otherwise. Please apply. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2006-Nov-30 12:56 UTC
Re: [Xen-devel] [PATCH] Bugfix: Don''t use function pointers to inline functions
>There''s code, which use inline functions on function pointers. >This is IMO a bug.I disagree - inline is a hint, not a requirement (other than one might say about __attribute__((__always_inline__)), or when functions are declared/ defined extern inline). Hence I would expect the compiler to generate out-of-line instances when addresses of the function are taken. Have you brought this up with the gcc folks? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel