]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Adjust linker script to avoid having a PT_LOAD header all the way from zero
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 7 Dec 2015 14:37:28 +0000 (14:37 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 7 Dec 2015 17:37:23 +0000 (17:37 +0000)
Previously, the generated binaries had a single PT_LOAD header all the
way from 0 to the end of the generated code.

When building, the domain builder maps the entire region and
zeroes/copies the data as appropriate.  This causes a failure to build
when the header overlaps with unmapped addresses such as the HVM legacy
VGA range.

Link all binaries to load and run at 1MB to avoid the legacy VGA hole in
HVM guests.

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

index de4eab21320a4537b154dcefa6bc7bc3c5937c3b..4ad6864092e1c525517eef0230bf24a2b26427b5 100644 (file)
@@ -23,13 +23,19 @@ OUTPUT_ARCH(i386)
 
 ENTRY(_start)
 
+PHDRS
+{
+        /* Single loadable section, RWE. */
+        load PT_LOAD FLAGS(7);
+}
+
 SECTIONS
 {
-        . = 0x10000;
+        . = SEGMENT_START("text-segment", MB(1));
 
         .text : {
                 *(.text)
-        } = 0x9090
+        } :load = 0x9090
 
         .rodata : {
                 *(.rodata)