runtime mangling

Jim Dehnert dehnert at sgi.com
Fri Mar 10 21:31:10 UTC 2000


Martin von Loewis wrote:
> 
> > What are people's preferences for the underlying principle?  The method
> > of specification?
> 
> For the __cxa routines, it seems that linkage is not relevant to the
> user; since they are in implementation namespace, there is no need to
> put them explicitly into a reserved namespace. I think giving them C
> linkage would be fine.

I put this exclusion into the layout document.  If it looks OK to people,
we'll leave it there as a statement of the principle.

> I could not find a definite decision on naming the namespace for
> user-callable functions; I still dislike using a non-reserved name
> (abi).  As you recall, the problem is that users could come up with
> programs that are completely well-formed standard C++, which still
> would fail in a C++ ABI implementation.

The decision, currently documented in the ABI layout document, is to use
a reserved name for the namespace (__cxxabiv1, I believe), and include
a aliasing declaration in the header file to treat it as "abi".  The
effect on users is that they will not conflict accidently with the
mangled names, and should get an immediate indication from the compiler
if they attempt to define namespace "abi" in the same file where they're
using the header.  This was felt to be a good compromise between providing
an easy-to-use name, and avoiding obscure link-time name conflicts.

Jim




More information about the cxx-abi-dev mailing list