Skip to contentSkip to conversation

Build fix for -O0

PATCH New Christoph Egger 1 participant 1 message Dec 1, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Build fix for -O0

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.

xen/include/asm-x86/x86_32/elf.h +1 -1
diff -r 952c2cddff0c xen/include/asm-x86/x86_32/elf.h
@@ -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;
xen/include/asm-x86/x86_64/elf.h +1 -1
diff -r 952c2cddff0c xen/include/asm-x86/x86_64/elf.h
@@ -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;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel