Using lex in a shared library
Joerg Sonnenberger
joerg at britannica.bec.de
Sat Jul 3 10:10:48 UTC 2010
On Fri, Jul 02, 2010 at 04:52:45PM -0700, Xin LI wrote:
> I think that amd64 requires a static library be compiled with -fPIC if
> it's being linked into shared object. This should not be done for
> normal static libraries, though, as this could give some performance
> penalty when it's not needed (i.e. a static binary).
More precisely, AMD64 disallows absolute references in the text segment.
The performance penalty for PIC on AMD64 is minimal as it can do
RIP-relative addressing.
Joerg
More information about the freebsd-hackers
mailing list