From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjDSG-0001V4-8b for qemu-devel@nongnu.org; Thu, 03 Sep 2009 10:38:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjDSB-0001Rq-LS for qemu-devel@nongnu.org; Thu, 03 Sep 2009 10:38:27 -0400 Received: from [199.232.76.173] (port=42067 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjDSB-0001Rf-FQ for qemu-devel@nongnu.org; Thu, 03 Sep 2009 10:38:23 -0400 Received: from mx20.gnu.org ([199.232.41.8]:38118) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjDSB-00080n-2U for qemu-devel@nongnu.org; Thu, 03 Sep 2009 10:38:23 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjDS9-0008Uk-7t for qemu-devel@nongnu.org; Thu, 03 Sep 2009 10:38:21 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH v2] Build *-user targets as PIE Date: Thu, 3 Sep 2009 15:38:19 +0100 References: <87ljkxibay.fsf@lechat.rtp-net.org> <20090903120010.GA27116@1und1.de> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200909031538.19806.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Kirill A. Shutemov" > PIE code usually is a bit slower. Approximately, 1% for i386 according to > some tests. RISC architectures should be affected less, since they have > more registers. On other hand we are getting rid from text relocations on > i386 which make executable loading slower. So... I think you've got that backwards. A traditional (fixed address) executable requires no load-time relocation for internal references because all addresses are known at static link time. PIE require the dynamic linker adjust all absolute addresses. Paul