]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Create hvm64 test binaries as elf32
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 12 Nov 2015 14:56:01 +0000 (14:56 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 12 Nov 2015 14:58:08 +0000 (14:58 +0000)
New improvements to the HVM domain building logic actually sanity check the
binary for being 32bit, as all HVM domains start in 32bit mode.

Previously, elf64 binaries were erroneously accepted.

In addition, drop the big/little endian bits.  x86 is unlikely to ever have a
big endian variant.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/link.lds.S

index 22f48a25aad3bcdd54f63d76f7d9e1db1fa4544d..93e362a21302ba77b06b4bc86719c2c27b5891b4 100644 (file)
@@ -7,12 +7,25 @@
 
 #if defined(__x86_64__)
 
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+#if defined(CONFIG_ENV_hvm64)
+
+/*
+ * All HVM guests start in 32bit mode in a stub
+ * which switches to the desired running mode.
+ */
+OUTPUT_FORMAT("elf32-x86-64")
+
+#else
+
+OUTPUT_FORMAT("elf64-x86-64")
+
+#endif
+
 OUTPUT_ARCH(i386:x86-64)
 
 #elif defined(__i386__)
 
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_FORMAT("elf32-i386")
 OUTPUT_ARCH(i386)
 
 #else