|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: [PATCH v2] Build *-user targets as PIE |
Date: | Thu, 03 Sep 2009 16:52:02 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 |
On 09/03/2009 04:38 PM, Paul Brook wrote:
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.
Yes, but since it's also compiled as PIE, there are no absolute addresses. Previously QEMU was linked -shared but compiled as non-position independent code. I am not sure whether only the self-virtualized machine would be subject to relocation, or also the outer one (maybe address space virtualization would also have to be taken into account?).
Anyway, as far as text relocations are concerned Kirill's pathc cannot make things worse.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |