[FFmpeg-devel] Round 2: Symbol versioning

Reinhard Tartler siretart
Sun Dec 27 12:20:28 CET 2009

Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Sun, Dec 27, 2009 at 10:35:14AM +0100, Reinhard Tartler wrote:
>> These version scripts need to be adjusted on every SONAME bump.
> Seems like a really bad idea to me, that will be forgotten.
> I think it would be better to have them auto-generated or something.

Version scripts are not fully automated, but need to be actually
maintained, that's the point of symbol versioning.

Of course we can generate these scripts with awk from subdir.mak, but
we'd still need a list of symbol (patterns) that should be exported or

If we can agree on a policy that includes:
 - no symbols exported by default
 - exactly one version tag that matches SLIBNAME and SONAME
 - the list of public symbol patterns is in $LIBNAME/symbol.list
   (or similar)

then I'll happily include awk invocation in subdir.make that generates
the versioning script so that it always matches the SONAME of the

If you disagree with one of the above points, please explain and I'll
come up with something better.

>> libavformat and libavcodec are left rather liberal ATM because it is not
>> clear at this point which symbols are supposed to be exported and which
>> should rather be hidden. This file should be updated bit by bit by the
>> respective file maintainers.
> If it doesn't start with av_, ff_, avcodec_ or so it definitely should
> not be exported, if it needs to be that should be fixed ASAP.

In general I agree on this approach and in fact would welcome
it. However, I assume that you are aware that this would instantly break
building mplayer with a shared libavcodec and can take this statement as
an offer to fix the resulting breakage in mplayer?

FYI, I'm attaching the list of symbols in libavcodec and libavformat
with this patch applied. E.g. the functions url_* in libavformat seem to
me 'public', but there might be more. So I think before implementing
your change request, I'd love to see some more comments on this by other

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libavcodec52.txt.gz
Type: application/octet-stream
Size: 19018 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091227/0120af57/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libavformat52.txt.gz
Type: application/octet-stream
Size: 8660 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091227/0120af57/attachment-0001.obj>
-------------- next part --------------

Reinhard Tartler, KeyID 945348A4

More information about the ffmpeg-devel mailing list