[FFmpeg-devel] Round 2: Symbol versioning
Måns Rullgård
mans
Mon Dec 28 13:02:22 CET 2009
Reinhard Tartler <siretart at tauware.de> writes:
> 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 @@
>>> +LIBAVCODEC_52 {
>>> + 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
> manually.
It can probably be generated from some kind of template to ensure the
version numbers stay in sync.
> 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).
The patch as-is is unacceptable since it breaks all non-ELF targets
and all non-gnu linkers. That's not very hard to fix, of course, and
I will do it once the more important issues are settled.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list