From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: "Kirill A. Shutemov" <kirill@shutemov.name>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] Build *-user targets as PIE
Date: Fri, 4 Sep 2009 07:33:25 +0300 [thread overview]
Message-ID: <cc557aab0909032133q48081343ye195857132585228@mail.gmail.com> (raw)
In-Reply-To: <20090903171732.GA19183@1und1.de>
On Thu, Sep 3, 2009 at 8:17 PM, Reimar
Döffinger<Reimar.Doeffinger@gmx.de> wrote:
> On Thu, Sep 03, 2009 at 06:07:21PM +0300, Kirill A. Shutemov wrote:
>> On Thu, Sep 3, 2009 at 5:38 PM, Paul Brook<paul@codesourcery.com> 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.
>>
>> Usermode qemu on i386 is not a traditional executable, sicne it uses
>> -Wl,-shared for linking. In result we've got an executable which looks
>> like PIE, but dynamic linker have to resolve text relocations. I think
>> the best way it to create a true PIE without a text relocations.
>
> It is close to getting of topic, but since you state it, why try so hard
> to avoid text relocations?
> Sure, there are advantages (the biggest one is less issues with
> mis-/insufficiently configured selinux I think), possibly better sharing
> of pages when many instances are run and better delayed loading, but on
> x86/i386 that doesn't sound like a clear advantage compared to the in
> some cases quite relevant speed loss.
Do you have any numbers about speed loss?
> Also, since this patch adds --disable-pie, isn't the hack currently used
> still necessary for that case?
> Or is --disable-pie supposed to disable self-hosting? Then maybe the
> option should be named --disable-self-hosting (and if that is indeed the
> only side-effect it might be better to disable it by default)?
>
next prev parent reply other threads:[~2009-09-04 4:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 15:21 [Qemu-devel] [PATCH 1/2] Do not link *-user target with libhw*.a Kirill A. Shutemov
2009-09-02 15:21 ` [Qemu-devel] [PATCH 2/2] Build *-user targets as PIE Kirill A. Shutemov
2009-09-02 14:24 ` [Qemu-devel] " Paolo Bonzini
2009-09-02 14:35 ` Kirill A. Shutemov
2009-09-02 15:46 ` [Qemu-devel] " Arnaud Patard
2009-09-02 15:52 ` Kirill A. Shutemov
2009-09-02 16:03 ` Arnaud Patard
2009-09-03 12:15 ` [Qemu-devel] [PATCH v2] " Kirill A. Shutemov
2009-09-03 12:00 ` Reimar Döffinger
2009-09-03 14:21 ` Kirill A. Shutemov
2009-09-03 14:38 ` Paul Brook
2009-09-03 14:52 ` [Qemu-devel] " Paolo Bonzini
2009-09-03 15:07 ` [Qemu-devel] " Kirill A. Shutemov
2009-09-03 17:17 ` Reimar Döffinger
2009-09-04 4:33 ` Kirill A. Shutemov [this message]
2009-09-04 7:51 ` Reimar Döffinger
2009-09-04 8:03 ` Kirill A. Shutemov
[not found] ` <m3ws4g9qqe.fsf@neno.mitica>
2009-09-03 12:51 ` [Qemu-devel] " Kirill A. Shutemov
2009-09-03 14:39 ` [Qemu-devel] " Paul Brook
2009-09-03 15:08 ` Kirill A. Shutemov
2009-09-02 18:54 ` [Qemu-devel] [PATCH 2/2] " Riku Voipio
[not found] ` <m3iqg1ckts.fsf@neno.mitica>
2009-09-02 18:59 ` [Qemu-devel] " Kirill A. Shutemov
-- strict thread matches above, loose matches on Subject: below --
2009-09-03 18:36 [Qemu-devel] [PATCH v2] " Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc557aab0909032133q48081343ye195857132585228@mail.gmail.com \
--to=kirill@shutemov.name \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).