From: "Christoph Egger" Subject: [PATCH] Build fix for -O0 Date: Fri, 1 Dec 2006 15:20:51 +0100 Message-ID: <200612011520.51135.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_DpDcFYb5IpxoTLf" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_DpDcFYb5IpxoTLf Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Across different gcc versions with -O0 I get this linking error on x86_32 and x86_64: /usr/src/xen-ddb-unstable.hg/xen/common/built_in.o: In function `machine_crash_save_cpu': /usr/src/xen-ddb-unstable.hg/xen/common/kexec.c:78: undefined reference to `elf_core_save_regs' /usr/src/xen-ddb-unstable.hg/xen/common/kexec.c:78: relocation truncated to fit: R_X86_64_PC32 against undefined symbol `elf_core_save_regs' The attached patch fixes this for x86_32 and x86_64. ppc and ia64 may need this fix, too. --Boundary-00=_DpDcFYb5IpxoTLf Content-Type: text/x-diff; charset=us-ascii; name=xm_inline.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xm_inline.diff diff -r 952c2cddff0c xen/include/asm-x86/x86_32/elf.h --- a/xen/include/asm-x86/x86_32/elf.h Thu Nov 30 20:16:54 2006 +0000 +++ b/xen/include/asm-x86/x86_32/elf.h Fri Dec 01 15:16:00 2006 +0100 @@ -23,7 +23,7 @@ typedef struct { unsigned long ss; } ELF_Gregset; -extern inline void elf_core_save_regs(ELF_Gregset *core_regs, +static inline void elf_core_save_regs(ELF_Gregset *core_regs, crash_xen_core_t *xen_core_regs) { unsigned long tmp; diff -r 952c2cddff0c xen/include/asm-x86/x86_64/elf.h --- a/xen/include/asm-x86/x86_64/elf.h Thu Nov 30 20:16:54 2006 +0000 +++ b/xen/include/asm-x86/x86_64/elf.h Fri Dec 01 15:16:00 2006 +0100 @@ -33,7 +33,7 @@ typedef struct { unsigned long gs; } ELF_Gregset; -extern inline void elf_core_save_regs(ELF_Gregset *core_regs, +static inline void elf_core_save_regs(ELF_Gregset *core_regs, crash_xen_core_t *xen_core_regs) { unsigned long tmp; --Boundary-00=_DpDcFYb5IpxoTLf Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_DpDcFYb5IpxoTLf--