qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Ed Maste <emaste@freebsd.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFT PATCH] configure: Simplify alternate .text segment
Date: Wed, 19 Jun 2013 11:25:00 -0700	[thread overview]
Message-ID: <51C1F77C.2010109@twiddle.net> (raw)
In-Reply-To: <1371608954-86331-1-git-send-email-emaste@freebsd.org>

On 06/18/2013 07:29 PM, Ed Maste wrote:
>  if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
> +  textseg_addr=
>    case "$ARCH" in
> -  alpha | s390x | aarch64)
> -    # The default placement of the application is fine.
> +  arm | hppa | i386 | ia64 | m68k | ppc | ppc64 | s390 | sparc | sparc64 | x86_64)
> +    default_textseg_addr=0x400000
> +    textseg_addr=0x60000000
>      ;;
> -  *)
> -    ldflags="$linker_script $ldflags"
> +  mips)
> +    default_textseg_addr=0x120000000
> +    textseg_addr=0x400000

Correct defaults, from current binutils sources:

    arm:	0x8000
    hppa:	0x10000
    i386:	0x08048000
    ia64:	0x4000000000000000
    m68k:	0x80000000
    mips:	0x0400000
    ppc:	0x10000000 (linux),  0x01800000 (other)
    ppc64:	0x10000000
    s390:	0x00400000
    s390x:	0x80000000
    sparc:	0x100000
    sparc64:	0x100000000 (solaris), 0x100000 (other)
    x86_64:	0x400000

I can't imagine that the defaults have changed significantly from previous
binutils releases.

So... what you've got is correct for x86_64 only, which means that the sed
won't actually be effective.

Given the large variance in the true default, I wonder if we shouldn't ignore
it entirely.  I wonder if we can't edit more like this:

  s/[.] = .* [+] SIZEOF_HEADERS/. = $textseg_addr + SIZEOF_HEADERS/

I note that the current mips.ld file, from whence you took your "new" address,
is the same as the real default.  I.e. no movement.  I suspect that we can
actually move the binary to 0x60000000 with the rest of the targets.  Failing
that, we should move mips to the "don't change" category.

I also suggest that ia64 be moved to the "don't change" category.  It's default
text address is 0x4000000000000000, which is as far out of the way of the guest
address space as we can get.


r~

  reply	other threads:[~2013-06-19 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  2:29 [Qemu-devel] [RFT PATCH] configure: Simplify alternate .text segment Ed Maste
2013-06-19 18:25 ` Richard Henderson [this message]
2013-06-19 19:57   ` Ed Maste
2013-06-19 20:09     ` Richard Henderson

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=51C1F77C.2010109@twiddle.net \
    --to=rth@twiddle.net \
    --cc=emaste@freebsd.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).