Thread (78 messages) 78 messages, 13 authors, 2017-10-20

Re: x86: PIE support and option to extend KASLR randomization

From: Daniel Micay <hidden>
Date: 2017-08-16 16:26:36
Also in: kvm, linux-arch, linux-pm

How are these assumptions hardcoded by GCC? Most of the instructions
should be 
relocatable straight away, as most call/jump/branch instructions are
RIP-relative.

I.e. is there no GCC code generation mode where code can be placed
anywhere in the 
canonical address space, yet call and jump distance is within 31 bits
so that the 
generated code is fast?
That's what PIE is meant to do. However, not disabling support for lazy
linking (-fno-plt) / symbol interposition (-Bsymbolic) is going to cause
it to add needless overhead.

arm64 is using -pie -shared -Bsymbolic in arch/arm64/Makefile for their
CONFIG_RELOCATABLE option. See 08cc55b2afd97a654f71b3bebf8bb0ec89fdc498.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help