[FFmpeg-devel] Round 2: Symbol versioning

Reinhard Tartler siretart
Mon Dec 28 12:35:21 CET 2009

Michael Niedermayer <michaelni at gmx.at> writes:

> On Sun, Dec 27, 2009 at 10:35:14AM +0100, Reinhard Tartler wrote:
> [...]
>> diff --git a/libavcodec/libavcodec.v b/libavcodec/libavcodec.v
>> new file mode 100644
>> index 0000000..2be912f
>> --- /dev/null
>> +++ b/libavcodec/libavcodec.v
>> @@ -0,0 +1,3 @@
>> +	global: *;
>> +};
> this is fine but note that to introduce symbol versioning you can only
> do above the first time. Subsequent sonames need a dummy entry like
> X{};
> This is because ld.so slightly favors the first version for binding
> unversioned references
> (in unchanged gnu ld.so the effect is limited to libs that define
>  multiple symbols with the same name)
> in my patched version though this is essential so unversioned references
> are bound to the correct versioned definition if no unversioned definition
> exists across libraries.
> (its a ugly hack but ld.so already uses this check and i didnt want to
>  introduce another different approuch)
> also the empty X version does no harm ...

Okay, this means that libavcodec.v cannot really be generated
(cf. discussion with Raimar in this thread) but must be maintained

Any other objections or is the current form OK to apply? (note that I
don't have commit access to svn myself and would need a sponsor).

If yes, I'll apply this approach to the ffmpeg 0.5 packages in
debian/ubuntu and start the transition. Just to confirm, libavutil will
of course use the following version script:

| 	global: *;
| };

Reinhard Tartler, KeyID 945348A4

More information about the ffmpeg-devel mailing list