qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] meson: remove -no-pie linker flag


From: Paolo Bonzini
Subject: Re: [PATCH] meson: remove -no-pie linker flag
Date: Tue, 23 May 2023 13:55:13 +0200

On Tue, May 23, 2023 at 10:18 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > The issue is that Meson only has "enable PIE" or "leave PIE to the
> > compiler default", while QEMU also has "disable PIE"---which is the
> > messy one.
>
> Does QEMU actually need "disable PIE" ? It existed in configure of
> course, is there a reason we need to continue to support it in meson ?

We have "disable PIE" support because PIE has a performance cost,
though that's mostly for 32-bit x86 processors. Other ISAs have
instructions that help (like x86-64's RIP-relative addressing,
aarch64's adr/adrp, or RISC-V's auipc) and then position-independent
code becomes the natural one anyway.

However, I am inclined to keep it also because "--disable-pie uses the
compiler default, and who knows what your distro did" is less obvious
than "--disable-pie disables PIE".

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]