https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386

--- Comment #42 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
> In Linux, we don't even bother with PIC codegen, even though we link with 
> -pie.

My git-grep for that is coming up empty, where should I look?


> ... on x86_64, where PIC and non-PIC codegen are radically different, and
> non-PIC codegen for the kernel is different again from non-PIC codegen for
> user space.

Do you mean that on arm64 PIC vs. non-PIC differences are less radical? Or
there's no interest in building [parts of] the kernel with -fPIE for arm64? 

> No there is not. I was referring to arm64 before, where non-PIC codegen is
> actually better for us than PIC codegen, because it omits all the GOT stuff
> and other things that are only relevant to shared libraries in user space
> (symbol preemption, reducing the CoW footprint of writable segments, etc)

I still find myself confused, because non-PIC is going to be more efficient
everywhere for the same reasons, not just on arm64.

Reply via email to