Russ Allbery wrote: > Andrey Rahmatullin <w...@debian.org> writes: > > Text relocations are forbidden at least on amd64 though. > > https://stackoverflow.com/questions/7865059/why-does-gcc-force-pic-for-x64-shared-libs > > Yeah, but I believe not on i386. > > This is really a very 32-bit, x86-specific problem.
Also, x86-64 has %rip as an accessible register and %rip-relative addressing, so it doesn't require tricks like "call next instruction, pop off the return value, offset from that". With %rip-relative addressing, PIC doesn't cost you a register at all.