]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/multiboot: Fix load address of test kernels
authorKevin Wolf <kwolf@redhat.com>
Mon, 22 Jul 2019 09:26:15 +0000 (11:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 30 Jul 2019 10:25:43 +0000 (12:25 +0200)
While older toolchains produced binaries where the physical load address
of ELF segments was the same as the virtual address, newer versions seem
to choose a different physical address if it isn't specified explicitly.
The means that the test kernel doesn't use the right addresses to access
e.g. format strings any more and the whole output disappears, causing
all test cases to fail.

Fix this by specifying the physical load address of sections explicitly.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/multiboot/link.ld

index 3d49b58c60c6c15a0705958df72087a74ceabc67..2eafcffc4f123255befccf11db5b4828be7ee322 100644 (file)
@@ -3,14 +3,14 @@ ENTRY(_start)
 SECTIONS
 {
     . = 0x100000;
-    .text : {
+    .text : AT(ADDR(.text)) {
         *(multiboot)
         *(.text)
     }
-    .data ALIGN(4096) : {
+    .data ALIGN(4096) : AT(ADDR(.data)) {
         *(.data)
     }
-    .rodata ALIGN(4096) : {
+    .rodata ALIGN(4096) : AT(ADDR(.rodata)) {
         *(.rodata)
     }
     .bss ALIGN(4096) : {