[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFT PATCH] configure: Simplify alternate .text segment

From: Richard Henderson
Subject: Re: [Qemu-devel] [RFT PATCH] configure: Simplify alternate .text segment
Date: Wed, 19 Jun 2013 11:25:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]