[Ffmpeg-devel] [patch] gcc4 visibility support
Wed Jun 7 11:52:36 CEST 2006
Erik Slagter said:
> On Fri, 2006-06-02 at 18:45 +0200, Diego 'Flameeyes' Petten? wrote:
> [ ... ]
>> When hiding symbols, the entry points in the libraries are removed, the
>> symbols are not visible by outside, so for a start VLC can't declare two
>> externs with the name of the mpeg4 matrix tables and use them if they are
>> exported by the library. This brings a development upside: you have control
>> on the symbols you export, if some software is relying on the internal
>> variables and structures, it's cut off, it avoids mysterious crashes due to
>> change in ABI of internal functions.
> [ ... ]
> At the risk of talking utterly non-sense: in what respect does this
> concept differ from declaring a symbol static or non-static?
It is the same concept, but applied at the shared library level rather than
individual object files. Internal functions and data need to be accessible
from multiple source files, so declaring them static is not an option, but
hiding them from apps linking to a shared library can be a good thing. The
visibility attribute has no effect on static libraries, as these are merely
a collection of object files.
mru at inprovide.com
More information about the ffmpeg-devel