Section 5.9. Cfilt Utility


5.9. C++filt Utility

With C++ polymorphism and templates, functions in different classes or functions with different argument lists may have the same name. For the linker to build the executable or library, it must be able to distinguish between the functions. To facilitate this, the function names in the object code are altered depending on their class or argument list. This is called name mangling. There is no standard implementation for name mangling; as a result, name mangling is different between compiler manufacturers and even between compiler versions. Unfortunately, the behavior is not changed with VACPP and the GNU compilers. Fortunately, however, VACPP and GNU do have something in common that enables you to view mangled function names: the c++filt utility. The c++filt command returns the demangled function name of a mangled symbol. For more detailed information about the c++filt command for the GNU compiler, refer to the man page on your system or to GNU online documentation.




UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net