环顾四周,我看到的主要问题是关于对 C++ 符号进行分解,而不是如何分解它们。是的,可以调用 g++
, 使用 -S
选项,在一些包含要修改的符号的虚拟代码上,然后检查生成的程序集,但我无法找到关于 GCC 名称修改的良好引用或规范。我能找到的最接近的地方是 http://www.int0x80.gr/papers/name_mangling.pdf ,但它似乎没有涵盖诸如名称模板实例如何被破坏或为什么_Z3fooIN3BarEE3FooIXT_EEv
将转换为 Foo<Bar> foo<Bar>()
(虽然我可以看出是怎么回事,但到底是什么 IXT_EE
?为什么在 N
之后没有 _Z
?那是什么意思?)。
最佳答案
引自 source code of gcc's implementation of name mangling :
This file implements mangling of C++ names according to the IA64 C++ ABI specification.
以下是本规范的规则: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling
关于c++ - GCC C++ 名称修改引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41524956/