From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue9Dy-0002hu-Lq for qemu-devel@nongnu.org; Sun, 19 May 2013 15:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ue9Du-00030k-3a for qemu-devel@nongnu.org; Sun, 19 May 2013 15:24:54 -0400 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:63672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue9Dt-00030c-Sy for qemu-devel@nongnu.org; Sun, 19 May 2013 15:24:50 -0400 Received: by mail-ea0-f176.google.com with SMTP id k11so3264408eaj.7 for ; Sun, 19 May 2013 12:24:49 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <519926F9.30503@redhat.com> Date: Sun, 19 May 2013 21:24:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Could configure generate QEMU's linker scripts? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ed Maste Cc: Michael Tokarev , qemu-devel@nongnu.org Il 19/05/2013 18:30, Ed Maste ha scritto: > I'd rather > not end up just introducing a parallel set of ldscript files for > FreeBSD, so would like to generate it from the default built-in one if > possible. > > For the FreeBSD x86-64 case I can create a suitable linker script (at > least, one identical to what's in the FreeBSD ports tree) with just > the following: > > ld --verbose | sed \ > -e '1,/==================================================/d' \ > -e '/==================================================/,$d' \ > -e 's/0x400000/0x60000000/g' > > That is, it just changes the start address. Is this generally the > only difference between QEMU's linker scripts and system built-ins? > (Perhaps we're missing other changes in FreeBSD, or platforms other > than x86_64 have more extensive changes?) Is this still needed if you compile QEMU with PIE? Currently we do that only for a few architectures due to lack of testing, but it could well be made the default, and help dropping the linker scripts. Paolo