On 20/02/2015 12:06, Simon McVittie wrote: > On 19/02/15 23:19, Jeff Epler wrote: >> Here are two scenarios where building a static library (libfoo) with >> -fPIC is desirable > ... >> I wonder whether these scenarios were considered when the Policy was >> written. > Conversely, when that part of the policy was written, 32-bit x86 was the > major architecture. > > My understanding is that i386 performance suffers significantly from PIC > (since PIC uses up a CPU register, and i386 doesn't have many of those), > whereas on architectures with more registers (notably including ARM, > x86-64 (including x32) and PowerPC), it doesn't hurt anywhere near as much.
There is also the cost of a indirections (a double indirection, IIRC) to reach global variables on PIC code through the GOT, while non-PIC code can reach global objects directly. Alastair > S > > -- Alastair McKinstry, <alast...@sceal.ie>, <mckins...@debian.org>, https://diaspora.sceal.ie/u/amckinstry Misentropy: doubting that the Universe is becoming more disordered. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/54e72644.5090...@sceal.ie