From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37905 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhTdB-0007yP-Ex for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:07:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhTcp-0006Vf-Aj for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:07:00 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:49655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhTcp-0006VU-5F for qemu-devel@nongnu.org; Mon, 24 Jan 2011 16:06:59 -0500 Received: by wwi18 with SMTP id 18so4434254wwi.10 for ; Mon, 24 Jan 2011 13:06:58 -0800 (PST) Message-ID: <4D3DE9ED.8030407@gmail.com> Date: Mon, 24 Jan 2011 22:06:53 +0100 From: Stefano Bonifazi MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC/PATCH] elfload: add FDPIC support References: <1294562938-20097-1-git-send-email-vapier@gentoo.org> <4D3D7FD4.3090008@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Frysinger Cc: qemu-devel@nongnu.org On 01/24/2011 08:11 PM, Mike Frysinger wrote: > On Mon, Jan 24, 2011 at 08:34, Stefano Bonifazi wrote: >> Is FDPIC something different than simply PIC code (position independent >> code)? > FDPIC ELF is the ELF PIE format used on NOMMU systems so that both the > text and data regions may be located anywhere. it is the only ELF > format supported under NOMMU systems. > >> I am also trying to fight with the problem of changing the starting address >> of target code for qemu-user, and I was just moving into the option of using >> PIC target code .. but the original qemu-user load_elf_binary does not work >> on them.. and I was just about to try to edit it.. > i dont believe my patch accomplishes that in any way. i will need to > force all files to be loaded at a higher address than zero for the > Blackfin arch (as the first ~4KiB is reserved for the ABI), but that > is independent of FDPIC ELF support. > -mike I don't understand.. what is the difference between pie binary for pcc and for your architecture? As far as I understood pie code is independent from addresses, so it should not care if the OS running them would have an mmu at all.. it should be just the task of the dynamic linker to relocate it properly, am I wrong? Thank you! Regards, Stefano B.