From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpN48-0000qk-3a for qemu-devel@nongnu.org; Wed, 19 Jun 2013 14:25:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpN45-0000f4-7L for qemu-devel@nongnu.org; Wed, 19 Jun 2013 14:25:08 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:38924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpN45-0000eK-2U for qemu-devel@nongnu.org; Wed, 19 Jun 2013 14:25:05 -0400 Received: by mail-vc0-f169.google.com with SMTP id ia10so4101000vcb.28 for ; Wed, 19 Jun 2013 11:25:04 -0700 (PDT) Sender: Richard Henderson Message-ID: <51C1F77C.2010109@twiddle.net> Date: Wed, 19 Jun 2013 11:25:00 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1371608954-86331-1-git-send-email-emaste@freebsd.org> In-Reply-To: <1371608954-86331-1-git-send-email-emaste@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFT PATCH] configure: Simplify alternate .text segment List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ed Maste Cc: qemu-devel@nongnu.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~