Not only does limiting the exported symbols improve startup in loading the symbol table, but the linker also knows that all private symbols won't need to be relocated for outside callers. It therefore doesn't generate the relocation call overhead for calls to private symbols, which removes some levels of indirection and can produce more performance gains, particularly on register-starved architectures like x86.
If you haven't found it already, Ulrich Drepper's paper on shared library symbols is the canonical work in this area for Linux and is definitely worth reading.
(no subject)
Date: 2010-07-29 11:18 pm (UTC)If you haven't found it already, Ulrich Drepper's paper on shared library symbols is the canonical work in this area for Linux and is definitely worth reading.
http://people.redhat.com/drepper/dsohowto.pdf