[Openmcl-devel] Advice needed to debug shared library problem

dherring at tentpost.com dherring at tentpost.com
Thu Mar 31 09:44:02 PDT 2011


Gary Byers wrote:
> On Wed, 30 Mar 2011, Waldek Hebisch wrote:
>
>> I wonder why instead of fooling with linker flags (which may
>> easily fail if sombody needs different way of linking) you do
>> not take the obvoius approach of renaming offending symbol
>> using apropriate prefix.
>
> I considered "fooling with linker flags" to be a better solution
> than "fooling with function names" would be, since the issue isn't
> that two unrelated functions have the same name, it's that (almost all)
> function names in the CCL kernel should not be visible/available for
> dynamic linking.

CL package names don't clash by convention; there is no central registry. 
Similarly, the "C way" is to have a uniform naming convention that avoids
conflicts.  For example, C++ symbols usually begin with the prefix _Z,
ECL's symbols are si_* and cl_*, ...

benefits of a ccl_ prefix:
- no linker magic needed (though still useful for other reasons)
- possibility for C code to link when it really wants to...
- no ambiguity when debugging code that linked it's own version of the
same symbol

FWIW, ECL distinguishes between private and public symbols by using
different prefixes.

Later,
Daniel




More information about the Openmcl-devel mailing list