On Thu, Sep 23, 2021 at 09:21:46PM +0100, Stuart Henderson wrote: > (the extra register used by PIE > hurts i386 mode a lot more than amd64 > mode with its extra registers),
Just for the sake of correctness: it hurts much less on x86_64, because there is IP-relative addressing for code *and* data. Unless you are using the medium or large code model (> 2GB code or data), functions can compute addresses in a single instruction without a temporary register or binding one to the GOT. So you get a smaller prologue and epilogue in any function that touches a a global variable. Joerg