summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer>2007-08-17 17:26:03 +0000
committerbouyer <bouyer>2007-08-17 17:26:03 +0000
commit03866b0746f1b444109b3b71dd5f9da38574cb27 (patch)
tree7b8112cf41357fd8ede5a64f25d1769daff101de /sysutils
parentd3bead0ca5c4c34a2cde22c48586eb860ab608c7 (diff)
downloadpkgsrc-03866b0746f1b444109b3b71dd5f9da38574cb27.tar.gz
Switch from using the pre-build binaries to building our own Xen kernel.
Apply a patch (patch-b*) to xen-3.1.0 to fix the ELF loader so that the symbol table is properly loaded for the NetBSD dom0 kernel. This is from the Xen repository, based on a patch inistally submitted by Christoph Egger to Xen (thanks !). Should fix PR port-xen/36671. While there also provide a debug Xen kernel, built with debug=1. Bump PKGREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xenkernel3/Makefile39
-rw-r--r--sysutils/xenkernel3/PLIST3
-rw-r--r--sysutils/xenkernel3/distinfo16
-rw-r--r--sysutils/xenkernel3/patches/patch-aa13
-rw-r--r--sysutils/xenkernel3/patches/patch-ab13
-rw-r--r--sysutils/xenkernel3/patches/patch-ac22
-rw-r--r--sysutils/xenkernel3/patches/patch-ad6
-rw-r--r--sysutils/xenkernel3/patches/patch-ba14
-rw-r--r--sysutils/xenkernel3/patches/patch-bb18
-rw-r--r--sysutils/xenkernel3/patches/patch-bc166
-rw-r--r--sysutils/xenkernel3/patches/patch-bd112
11 files changed, 407 insertions, 15 deletions
diff --git a/sysutils/xenkernel3/Makefile b/sysutils/xenkernel3/Makefile
index 2c7fe8b1704..a6d2f1b8e18 100644
--- a/sysutils/xenkernel3/Makefile
+++ b/sysutils/xenkernel3/Makefile
@@ -1,28 +1,47 @@
-# $NetBSD: Makefile,v 1.2 2007/07/01 20:20:24 bouyer Exp $
+# $NetBSD: Makefile,v 1.3 2007/08/17 17:26:03 bouyer Exp $
#
VERSION= 3.1.0
-DISTNAME= xen-${VERSION}-install-x86_32
+DISTNAME= xen-${VERSION}-src
PKGNAME= xenkernel3-${VERSION}
+PKGREVISION= 1
CATEGORIES= sysutils
-MASTER_SITES= http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/ \
- http://bits.xensource.com/oss-xen/release/${VERSION}/bin.tgz/
+MASTER_SITES= http://www.cl.cam.ac.uk/research/srg/netos/xen/downloads/ \
+ http://bits.xensource.com/oss-xen/release/${VERSION}/src.tgz/
EXTRACT_SUFX= .tgz
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.NetBSD.org/Ports/xen/
+MAINTAINER= bouyer@NetBSD.org
+HOMEPAGE= http://www.cl.cam.ac.uk/research/srg/netos/xen/
COMMENT= Xen3 Kernel
-CONFLICTS= xenkernel30-*
ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386
+CONFLICTS= xenkernel30-*
+
-WRKSRC= ${WRKDIR}/dist
+WRKSRC= ${WRKDIR}/xen-${VERSION}-src
NO_CONFIGURE= yes
-NO_BUILD= yes
+USE_TOOLS+= gmake
+
+PYTHON_VERSIONS_ACCEPTED= 24 23
+PY_PATCHPLIST= no
+
+SUBST_CLASSES+= py
+SUBST_STAGE.py= pre-build
+SUBST_FILES.py= xen/include/public/foreign/Makefile
+SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
+do-build:
+ cd ${WRKSRC} && ${GMAKE} XEN_TARGET_X86_PAE=n debug=n xen
+ ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz
+ cd ${WRKSRC} && ${GMAKE} clean && \
+ ${GMAKE} XEN_TARGET_X86_PAE=n debug=y xen
+ ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz
+
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/xen3-kernel
- ${INSTALL_DATA} ${WRKSRC}/install/boot/xen.gz ${PREFIX}/xen3-kernel/xen.gz
+ ${INSTALL_DATA} ${WRKDIR}/xen.gz ${PREFIX}/xen3-kernel/xen.gz
+ ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz ${PREFIX}/xen3-kernel/xen-debug.gz
+.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xenkernel3/PLIST b/sysutils/xenkernel3/PLIST
index d269804e2fe..5f95a49ffd3 100644
--- a/sysutils/xenkernel3/PLIST
+++ b/sysutils/xenkernel3/PLIST
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2007/06/14 19:37:00 bouyer Exp $
+@comment $NetBSD: PLIST,v 1.2 2007/08/17 17:26:03 bouyer Exp $
xen3-kernel/xen.gz
+xen3-kernel/xen-debug.gz
@dirrm xen3-kernel
diff --git a/sysutils/xenkernel3/distinfo b/sysutils/xenkernel3/distinfo
index 5ea4c492ace..068ff567532 100644
--- a/sysutils/xenkernel3/distinfo
+++ b/sysutils/xenkernel3/distinfo
@@ -1,5 +1,13 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/06/14 19:37:00 bouyer Exp $
+$NetBSD: distinfo,v 1.2 2007/08/17 17:26:03 bouyer Exp $
-SHA1 (xen-3.1.0-install-x86_32.tgz) = f60f1cd09592b24993c718cd380a5b125a716916
-RMD160 (xen-3.1.0-install-x86_32.tgz) = 6cab7f894fb3770005c11c1d1ae08647ea953679
-Size (xen-3.1.0-install-x86_32.tgz) = 23112271 bytes
+SHA1 (xen-3.1.0-src.tgz) = fa4b54c36626f2cce9b15dc99cafda0b42c54777
+RMD160 (xen-3.1.0-src.tgz) = 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3
+Size (xen-3.1.0-src.tgz) = 6831094 bytes
+SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59
+SHA1 (patch-ab) = 58ba3a1ec8c1bbc895dd70d286eb5a70778b7c7f
+SHA1 (patch-ac) = 3eb6179c90090d5b05f97a66b50cf78ce50e6f56
+SHA1 (patch-ad) = 0af2e62c4a1469d03b3999cf0864c62e28d95ed0
+SHA1 (patch-ba) = a90ffef881c3fadcf3c25e4c638ef33158ec9e87
+SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94
+SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844
+SHA1 (patch-bd) = 2a07955b1285d288458066813f8ebc801b8038c1
diff --git a/sysutils/xenkernel3/patches/patch-aa b/sysutils/xenkernel3/patches/patch-aa
new file mode 100644
index 00000000000..d9378da2bb5
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- xen/include/asm-x86/page.h.orig 2007-08-16 22:23:58.000000000 +0200
++++ xen/include/asm-x86/page.h 2007-08-16 22:24:43.000000000 +0200
+@@ -331,7 +331,7 @@
+ * WARNING: This will need to be disabled to run OSes that use the spare PTE
+ * bits themselves (e.g., *BSD).
+ */
+-#ifndef NDEBUG
++#if 0
+ #define _PAGE_GNTTAB _PAGE_AVAIL2
+ #else
+ #define _PAGE_GNTTAB 0
diff --git a/sysutils/xenkernel3/patches/patch-ab b/sysutils/xenkernel3/patches/patch-ab
new file mode 100644
index 00000000000..d4b31b8cb78
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- ./xen/arch/x86/shutdown.c.orig 2007-08-16 21:52:39.000000000 +0200
++++ ./xen/arch/x86/shutdown.c 2007-08-16 21:53:03.000000000 +0200
+@@ -197,7 +197,7 @@
+
+ #endif
+
+-void machine_restart(char * __unused)
++void machine_restart(char * __unused u)
+ {
+ int i;
+
diff --git a/sysutils/xenkernel3/patches/patch-ac b/sysutils/xenkernel3/patches/patch-ac
new file mode 100644
index 00000000000..87b58806b74
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- xen/tools/symbols.c.orig 2007-08-16 21:46:28.000000000 +0200
++++ xen/tools/symbols.c 2007-08-16 21:51:22.000000000 +0200
+@@ -103,7 +103,7 @@
+ _sextratext = s->addr;
+ else if (strcmp(sym, "_eextratext") == 0)
+ _eextratext = s->addr;
+- else if (toupper(stype) == 'A')
++ else if (toupper((int)stype) == 'A')
+ {
+ /* Keep these useful absolute symbols */
+ if (strcmp(sym, "__kernel_syscall_via_break") &&
+@@ -113,7 +113,7 @@
+ return -1;
+
+ }
+- else if (toupper(stype) == 'U' ||
++ else if (toupper((int)stype) == 'U' ||
+ is_arm_mapping_symbol(sym))
+ return -1;
+ /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */
diff --git a/sysutils/xenkernel3/patches/patch-ad b/sysutils/xenkernel3/patches/patch-ad
new file mode 100644
index 00000000000..4af0bcad2f8
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-ad
@@ -0,0 +1,6 @@
+$NetBSD: patch-ad,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- config/NetBSD.mk.orig 2007-08-16 21:44:15.000000000 +0200
++++ config/NetBSD.mk 2007-08-16 21:44:08.000000000 +0200
+@@ -0,0 +1 @@
++include $(XEN_ROOT)/config/StdGNU.mk
diff --git a/sysutils/xenkernel3/patches/patch-ba b/sysutils/xenkernel3/patches/patch-ba
new file mode 100644
index 00000000000..ae82a1ad19f
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-ba
@@ -0,0 +1,14 @@
+$NetBSD: patch-ba,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- xen/arch/x86/domain_build.c.orig 2007-08-16 21:34:39.000000000 +0200
++++ xen/arch/x86/domain_build.c 2007-08-16 21:43:18.000000000 +0200
+@@ -312,6 +312,9 @@
+ parms.pae ? ", PAE" : "",
+ elf_msb(&elf) ? "msb" : "lsb",
+ elf.pstart, elf.pend);
++ if ( elf.bsd_symtab_pstart )
++ printk(" Dom0 symbol map 0x%" PRIx64 " -> 0x%" PRIx64 "\n",
++ elf.bsd_symtab_pstart, elf.bsd_symtab_pend);
+
+ if ( !compatible )
+ {
diff --git a/sysutils/xenkernel3/patches/patch-bb b/sysutils/xenkernel3/patches/patch-bb
new file mode 100644
index 00000000000..5ac259dd624
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-bb
@@ -0,0 +1,18 @@
+$NetBSD: patch-bb,v 1.1 2007/08/17 17:26:04 bouyer Exp $
+
+--- xen/common/libelf/libelf-dominfo.c.orig 2007-05-18 16:45:21.000000000 +0200
++++ xen/common/libelf/libelf-dominfo.c 2007-08-16 21:43:18.000000000 +0200
+@@ -378,6 +378,13 @@
+ if ( parms->virt_entry == UNSET_ADDR )
+ parms->virt_entry = elf_uval(elf, elf->ehdr, e_entry);
+
++ if ( parms->bsd_symtab )
++ {
++ elf_parse_bsdsyms(elf, parms->virt_kend);
++ if ( elf->bsd_symtab_pend )
++ parms->virt_kend = elf->bsd_symtab_pend + parms->virt_offset;
++ }
++
+ elf_msg(elf, "%s: addresses:\n", __FUNCTION__);
+ elf_msg(elf, " virt_base = 0x%" PRIx64 "\n", parms->virt_base);
+ elf_msg(elf, " elf_paddr_offset = 0x%" PRIx64 "\n", parms->elf_paddr_offset);
diff --git a/sysutils/xenkernel3/patches/patch-bc b/sysutils/xenkernel3/patches/patch-bc
new file mode 100644
index 00000000000..151123f0f2d
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-bc
@@ -0,0 +1,166 @@
+$NetBSD: patch-bc,v 1.1 2007/08/17 17:26:05 bouyer Exp $
+
+--- xen/common/libelf/libelf-loader.c.orig 2007-05-18 16:45:21.000000000 +0200
++++ xen/common/libelf/libelf-loader.c 2007-08-16 21:43:18.000000000 +0200
+@@ -20,11 +20,15 @@
+ memset(elf, 0, sizeof(*elf));
+ elf->image = image;
+ elf->size = size;
+- elf->ehdr = (elf_ehdr *) image;
++ elf->ehdr = (elf_ehdr *)image;
+ elf->class = elf->ehdr->e32.e_ident[EI_CLASS];
+ elf->data = elf->ehdr->e32.e_ident[EI_DATA];
+
+- /* sanity check phdr */
++#ifdef VERBOSE
++ elf_set_verbose(elf);
++#endif
++
++ /* Sanity check phdr. */
+ offset = elf_uval(elf, elf->ehdr, e_phoff) +
+ elf_uval(elf, elf->ehdr, e_phentsize) * elf_phdr_count(elf);
+ if ( offset > elf->size )
+@@ -34,7 +38,7 @@
+ return -1;
+ }
+
+- /* sanity check shdr */
++ /* Sanity check shdr. */
+ offset = elf_uval(elf, elf->ehdr, e_shoff) +
+ elf_uval(elf, elf->ehdr, e_shentsize) * elf_shdr_count(elf);
+ if ( offset > elf->size )
+@@ -44,13 +48,13 @@
+ return -1;
+ }
+
+- /* find section string table */
++ /* Find section string table. */
+ section = elf_uval(elf, elf->ehdr, e_shstrndx);
+ shdr = elf_shdr_by_index(elf, section);
+ if ( shdr != NULL )
+ elf->sec_strtab = elf_section_start(elf, shdr);
+
+- /* find symbol table, symbol string table */
++ /* Find symbol table and symbol string table. */
+ count = elf_shdr_count(elf);
+ for ( i = 0; i < count; i++ )
+ {
+@@ -67,6 +71,7 @@
+ elf->sym_strtab = elf_section_start(elf, shdr);
+ break;
+ }
++
+ return 0;
+ }
+
+@@ -83,6 +88,101 @@
+ }
+ #endif
+
++/* Calculate the required additional kernel space for the elf image */
++void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t pstart)
++{
++ uint64_t sz;
++ const elf_shdr *shdr;
++ int i, type;
++
++ if ( !elf->sym_tab )
++ return;
++
++ pstart = elf_round_up(elf, pstart);
++
++ /* Space to store the size of the elf image */
++ sz = sizeof(uint32_t);
++
++ /* Space for the elf and elf section headers */
++ sz += (elf_uval(elf, elf->ehdr, e_ehsize) +
++ elf_shdr_count(elf) * elf_uval(elf, elf->ehdr, e_shentsize));
++ sz = elf_round_up(elf, sz);
++
++ /* Space for the symbol and string tables. */
++ for ( i = 0; i < elf_shdr_count(elf); i++ )
++ {
++ shdr = elf_shdr_by_index(elf, i);
++ type = elf_uval(elf, (elf_shdr *)shdr, sh_type);
++ if ( (type == SHT_STRTAB) || (type == SHT_SYMTAB) )
++ sz = elf_round_up(elf, sz + elf_uval(elf, shdr, sh_size));
++ }
++
++ elf->bsd_symtab_pstart = pstart;
++ elf->bsd_symtab_pend = pstart + sz;
++}
++
++static void elf_load_bsdsyms(struct elf_binary *elf)
++{
++ elf_ehdr *sym_ehdr;
++ unsigned long sz;
++ char *maxva, *symbase, *symtab_addr;
++ elf_shdr *shdr;
++ int i, type;
++
++ if ( !elf->bsd_symtab_pstart )
++ return;
++
++#define elf_hdr_elm(_elf, _hdr, _elm, _val) \
++do { \
++ if ( elf_64bit(_elf) ) \
++ (_hdr)->e64._elm = _val; \
++ else \
++ (_hdr)->e32._elm = _val; \
++} while ( 0 )
++
++ symbase = elf_get_ptr(elf, elf->bsd_symtab_pstart);
++ symtab_addr = maxva = symbase + sizeof(uint32_t);
++
++ /* Set up Elf header. */
++ sym_ehdr = (elf_ehdr *)symtab_addr;
++ sz = elf_uval(elf, elf->ehdr, e_ehsize);
++ memcpy(sym_ehdr, elf->ehdr, sz);
++ maxva += sz; /* no round up */
++
++ elf_hdr_elm(elf, sym_ehdr, e_phoff, 0);
++ elf_hdr_elm(elf, sym_ehdr, e_shoff, elf_uval(elf, elf->ehdr, e_ehsize));
++ elf_hdr_elm(elf, sym_ehdr, e_phentsize, 0);
++ elf_hdr_elm(elf, sym_ehdr, e_phnum, 0);
++
++ /* Copy Elf section headers. */
++ shdr = (elf_shdr *)maxva;
++ sz = elf_shdr_count(elf) * elf_uval(elf, elf->ehdr, e_shentsize);
++ memcpy(shdr, elf->image + elf_uval(elf, elf->ehdr, e_shoff), sz);
++ maxva = (char *)(long)elf_round_up(elf, (long)maxva + sz);
++
++ for ( i = 0; i < elf_shdr_count(elf); i++ )
++ {
++ type = elf_uval(elf, shdr, sh_type);
++ if ( (type == SHT_STRTAB) || (type == SHT_SYMTAB) )
++ {
++ elf_msg(elf, "%s: shdr %i at 0x%p -> 0x%p\n", __func__, i,
++ elf_section_start(elf, shdr), maxva);
++ sz = elf_uval(elf, shdr, sh_size);
++ memcpy(maxva, elf_section_start(elf, shdr), sz);
++ /* Mangled to be based on ELF header location. */
++ elf_hdr_elm(elf, shdr, sh_offset, maxva - symtab_addr);
++ maxva = (char *)(long)elf_round_up(elf, (long)maxva + sz);
++ }
++ shdr = (elf_shdr *)((long)shdr +
++ (long)elf_uval(elf, elf->ehdr, e_shentsize));
++ }
++
++ /* Write down the actual sym size. */
++ *(uint32_t *)symbase = maxva - symtab_addr;
++
++#undef elf_ehdr_elm
++}
++
+ void elf_parse_binary(struct elf_binary *elf)
+ {
+ const elf_phdr *phdr;
+@@ -133,6 +233,8 @@
+ memcpy(dest, elf->image + offset, filesz);
+ memset(dest + filesz, 0, memsz - filesz);
+ }
++
++ elf_load_bsdsyms(elf);
+ }
+
+ void *elf_get_ptr(struct elf_binary *elf, unsigned long addr)
diff --git a/sysutils/xenkernel3/patches/patch-bd b/sysutils/xenkernel3/patches/patch-bd
new file mode 100644
index 00000000000..c740a75eaac
--- /dev/null
+++ b/sysutils/xenkernel3/patches/patch-bd
@@ -0,0 +1,112 @@
+$NetBSD: patch-bd,v 1.1 2007/08/17 17:26:05 bouyer Exp $
+
+--- xen/include/public/libelf.h.orig 2007-05-18 16:45:21.000000000 +0200
++++ xen/include/public/libelf.h 2007-08-16 21:43:18.000000000 +0200
+@@ -69,6 +69,9 @@
+ uint64_t pend;
+ uint64_t reloc_offset;
+
++ uint64_t bsd_symtab_pstart;
++ uint64_t bsd_symtab_pend;
++
+ #ifndef __XEN__
+ /* misc */
+ FILE *log;
+@@ -91,33 +94,32 @@
+ #define elf_lsb(elf) (ELFDATA2LSB == (elf)->data)
+ #define elf_swap(elf) (NATIVE_ELFDATA != (elf)->data)
+
+-#define elf_uval(elf, str, elem) \
+- ((ELFCLASS64 == (elf)->class) \
+- ? elf_access_unsigned((elf), (str), \
+- offsetof(typeof(*(str)),e64.elem), \
+- sizeof((str)->e64.elem)) \
+- : elf_access_unsigned((elf), (str), \
+- offsetof(typeof(*(str)),e32.elem), \
+- sizeof((str)->e32.elem)))
+-
+-#define elf_sval(elf, str, elem) \
+- ((ELFCLASS64 == (elf)->class) \
+- ? elf_access_signed((elf), (str), \
+- offsetof(typeof(*(str)),e64.elem), \
+- sizeof((str)->e64.elem)) \
+- : elf_access_signed((elf), (str), \
+- offsetof(typeof(*(str)),e32.elem), \
+- sizeof((str)->e32.elem)))
+-
+-#define elf_size(elf, str) \
+- ((ELFCLASS64 == (elf)->class) \
+- ? sizeof((str)->e64) \
+- : sizeof((str)->e32))
++#define elf_uval(elf, str, elem) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? elf_access_unsigned((elf), (str), \
++ offsetof(typeof(*(str)),e64.elem), \
++ sizeof((str)->e64.elem)) \
++ : elf_access_unsigned((elf), (str), \
++ offsetof(typeof(*(str)),e32.elem), \
++ sizeof((str)->e32.elem)))
++
++#define elf_sval(elf, str, elem) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? elf_access_signed((elf), (str), \
++ offsetof(typeof(*(str)),e64.elem), \
++ sizeof((str)->e64.elem)) \
++ : elf_access_signed((elf), (str), \
++ offsetof(typeof(*(str)),e32.elem), \
++ sizeof((str)->e32.elem)))
++
++#define elf_size(elf, str) \
++ ((ELFCLASS64 == (elf)->class) \
++ ? sizeof((str)->e64) : sizeof((str)->e32))
+
+ uint64_t elf_access_unsigned(struct elf_binary *elf, const void *ptr,
+- uint64_t offset, size_t size);
++ uint64_t offset, size_t size);
+ int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
+- uint64_t offset, size_t size);
++ uint64_t offset, size_t size);
+
+ uint64_t elf_round_up(struct elf_binary *elf, uint64_t addr);
+
+@@ -165,6 +167,8 @@
+ void *elf_get_ptr(struct elf_binary *elf, unsigned long addr);
+ uint64_t elf_lookup_addr(struct elf_binary *elf, const char *symbol);
+
++void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t pstart); /* private */
++
+ /* ------------------------------------------------------------------------ */
+ /* xc_libelf_relocate.c */
+
+@@ -185,8 +189,8 @@
+ enum xen_elfnote_type type;
+ const char *name;
+ union {
+- const char *str;
+- uint64_t num;
++ const char *str;
++ uint64_t num;
+ } data;
+ };
+
+@@ -228,14 +232,14 @@
+ }
+
+ int elf_xen_parse_features(const char *features,
+- uint32_t *supported,
+- uint32_t *required);
++ uint32_t *supported,
++ uint32_t *required);
+ int elf_xen_parse_note(struct elf_binary *elf,
+- struct elf_dom_parms *parms,
+- const elf_note *note);
++ struct elf_dom_parms *parms,
++ const elf_note *note);
+ int elf_xen_parse_guest_info(struct elf_binary *elf,
+- struct elf_dom_parms *parms);
++ struct elf_dom_parms *parms);
+ int elf_xen_parse(struct elf_binary *elf,
+- struct elf_dom_parms *parms);
++ struct elf_dom_parms *parms);
+
+ #endif /* __XC_LIBELF__ */