[arch-general] -Bsymbolic-functions

Olivier Langlois olivier at olivierlanglois.net
Thu Dec 26 11:44:52 EST 2013

>From https://sourceware.org/binutils/docs/ld/Options.html#Options

    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.

I have discovered this ld switch by seeing it offered in the alsa-lib
configure script:

                          use -Bsymbolic-functions option if available
                          (optmization for size and speed)

My limited knowledge of how shared libraries work is that code refering
to a 'so' function jump in a location containing a second jump to the
address of the loaded symbol and this second jump instruction gets
patched when the 'so' is loaded. So my understanding of the switch is
that activating just go directly to the function without any

Could it be interesting to make this switch standard in makepkg.conf?
Has this ever been discussed in the past?
The only potential problem that I can foresee with its usage is for
programs 'hijacking' symbols by being preloaded first. The 2 programs
that I know doing this are: trickle and glc but I am sure that there are
many others.

More information about the arch-general mailing list