On Sun, Dec 31, 2017 at 5:12 PM, Andrew Cooper <andrew.coop...@citrix.com> wrote:
> On 31/12/2017 15:19, Bruno Alvisio wrote: > > Hi all, > > > > I was trying to create mini-os PVH instances both x86_32 and x86_64. I > have no issue with x86_32 but when trying to ‘xl create’ x86_64 type I get > the following error: > > > <snip> > > xc: error: panic: xc_dom_hvmloader.c:113: xc_dom_parse_hvm_kernel: ELF > image is not 32bit: Invalid kernel > > > The domain loader only ever accepts elf32 images, because the starting > state is 32bit flat mode. > > This is how XTF deals with the problem: > > http://xenbits.xen.org/gitweb/?p=xtf.git;a=blob;f=build/gen.mk;h= > 8d7a6bf89725fedc8343d2e4d3c8e2c93c16811f;hb=HEAD#l47 > > There is a lot of template meta-programming in there, but basically after > doing the final link, do a further objcopy to convert the image to > elf32-x86-64 (if available), or elf32-i386. The former is only available > if you have an x32 toolchain, and allows the binary to load properly and > disassemble correctly. > Thank you. Doing: $objcopy <obj_file> -O elf32-x86-64 <new_obj_file> worked perfectly! > > Happy New Year! > > > Happy new year. > > ~Andrew >
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel