[FFmpeg-devel] Problem building shared libraries using svn-r11100+ on x86_64

Uoti Urpala uoti.urpala
Wed Dec 5 02:59:58 CET 2007

On Wed, 2007-12-05 at 00:59 +0000, M?ns Rullg?rd wrote:
> Nicolas George <nicolas.george at normalesup.org> writes:
> > The visibility attributes does _exactly_ the same thing than -Bsymbolic, but
> > _just_ for the variables where it is needed. Furthermore, it does not
> > require a configure test.
> It's not standard C, so it does require a test.  The same effect can
> be achieved with linker scripts which, while non-standard, do not
> clutter the code.

You don't get "_exactly_ the same thing". Knowing visibility attributes
at compile time allows more efficient access to the symbols. For global
variables/constants this is always true: if you don't know the
visibility at compile time you must generate code which first loads the
address of the real variable from a PC-relative location, then loads the
value from there. For functions you can in principle generate equally
efficient code as long as the platform has PC-relative jumps (the linker
can change the jump to point directly to the destination function
instead of the PLT), but in practice gcc generates somewhat worse code
if you use default-visibility functions too.

More information about the ffmpeg-devel mailing list