[Ffmpeg-devel] Externally visible symbols without ff or av prefix

Aurelien Jacobs aurel
Sun Nov 12 15:25:22 CET 2006


On Sat, 11 Nov 2006 23:50:07 -0500
Rich Felker <dalias at aerifal.cx> wrote:

> On Sun, Nov 12, 2006 at 03:02:59AM +0100, Aurelien Jacobs wrote:
> > On Sun, 12 Nov 2006 02:45:19 +0100
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> > > Hi
> > > 
> > > On Sat, Nov 11, 2006 at 09:32:22PM +0000, M?ns Rullg?rd wrote:
> > > > There are quite a few symbols in libav* without an ff or av prefix.
> > > > Should we be doing something about that?
> > > 
> > > for the ones which arent used outside ff* just rename them whenever
> > > you want
> > 
> > IMO, for those one (ie. the one which are not part of public API),
> > the problem is not their name, but the fact that they are visible
> > externally.
> > I don't think renaming them is a so good idea. Making them invisible
> > seems to be a better idea (using the visibility attribute ?).
> 
> The C language does not have a "visibility attribute" because the unit
> of linkage is the compilation unit, i.e. C has no such thing as a
> "library" only a module (aka "compilation unit"). Using GNU/ELF/SVR4
> hacks to make these systems immune to the namespace pollution problem
> does not fix it.

Right, and that's unfortunate.

> I'm actually quite angry at the GCC folks for
> introducing these hacks because it means ignorant developers will use
> the hacks rather than fixing namespace issues, and in turn will make
> their software fail miserably on non-GNU-ish systems.

Ok, but it seems no one has anything better to propose. Do you ?
Adding a prefix to symbol names don't fix the problem. It only reduce
the probability of name colision, but this probability won't ever
drop to 0.

The best solution right now seems to be to simply ignore potential
name colision unless a real colision happens. And then rename the
faulty symbol (hopping the new name won't introduce a new collision).

Aurel




More information about the ffmpeg-devel mailing list