qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/4] tests/multiboot: Fix load address of test kernels
Date: Tue, 30 Jul 2019 13:24:22 +0200	[thread overview]
Message-ID: <20190730112425.21497-2-kwolf@redhat.com> (raw)
In-Reply-To: <20190730112425.21497-1-kwolf@redhat.com>

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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/multiboot/link.ld b/tests/multiboot/link.ld
index 3d49b58c60..2eafcffc4f 100644
--- a/tests/multiboot/link.ld
+++ b/tests/multiboot/link.ld
@@ -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) : {
-- 
2.20.1



  reply	other threads:[~2019-07-30 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 11:24 [Qemu-devel] [PULL 0/4] Block layer and multiboot test patches Kevin Wolf
2019-07-30 11:24 ` Kevin Wolf [this message]
2019-07-30 11:24 ` [Qemu-devel] [PULL 2/4] Fixes: add read-zeroes to 051.out Kevin Wolf
2019-07-30 11:24 ` [Qemu-devel] [PULL 3/4] block/copy-on-read: Fix permissions for inactive node Kevin Wolf
2019-07-30 11:24 ` [Qemu-devel] [PULL 4/4] scsi-cd: Fix inserting read-only media in empty drive Kevin Wolf
2019-07-30 12:27 ` [Qemu-devel] [PULL 0/4] Block layer and multiboot test patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730112425.21497-2-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).