SPRUI03E June 2015 – January 2023
C++ compilers use name mangling to avoid conflicts between identically named functions and variables. If name mangling were not used, symbol name clashes can occur.
You can use the demangler (dem6x) to demangle names and identify the correct symbols to use in assembly. See the "C++ Name Demangler" chapter of the TMS320C6000 Optimizing C/C++ Compiler User's Guide for details.
To defeat name mangling in C++ for symbols where polymorphism (calling a function of the same name with different kinds of arguments) is not required, use the following syntax:
extern "C" void somefunc(int arg);
The above format is the short method for declaring a single function. To use this method for multiple functions, you can also use the following syntax:
extern "C"
{
void somefunc(int arg);
int anotherfunc(int arg);
...
}