Re: Default value for CFLAGS/LDFLAGS set by dpkg
On Mon, Mar 31, 2008 at 10:23:59PM +0000, brian m. carlson wrote:
> On Mon, Mar 31, 2008 at 10:51:00PM +0200, Mike Hommey wrote:
>>> According to ld(1):
>>> When creating a shared library, bind references to global function
>>> symbols to the definition within the shared library, if any.
>>> This option is only meaningful on ELF platforms which support
>>> shared libraries.
>> A little bit OT, but does this have the same result as what is done
>> here ?
> No, this renames the symbol and sets the visibility to hidden. nm would
> mark this symbol with a "t" instead of a "T". This prevents external
> users from linking against this symbol, since it is not globally
> visible. In other words, this is much like the "static" specifier, but
> specific to the entire library, instead of just to that object file.
Note that the alias parts make sure the symbols are available for
external uses. So internal library calls will use the static-like
functions, and calls from external users end up on the aliases. As I
understand it, you avoid lookups for internal library calls.