This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Symbols, type_info, and name mangling.
- To: gcc <gcc at gcc dot gnu dot org>
- Subject: Symbols, type_info, and name mangling.
- From: Benjamin Scherrey <scherrey at switchco dot com>
- Date: Thu, 13 Jan 2000 03:19:05 -0600
- Organization: Proteus Technologies, Inc.
- Reply-To: scherrey at proteus-tech dot com
Where is the code that performs the name (de)mangling like when you
run objdump --syms --demangle or within the compiler when it creates
the mangled symbol names (especially C++ methods & operators)? How
does this code know when a symbol is mangled with the standard
mechanism vs. -fnew-abi's methods? I notice that the same copy of
objdump works on libraries compiled either way which surprised me. I
must be missing something rather obvious but I haven't figured out how
this code is so pervasive. The reason why I ask is that I'd like to be
able to resolve some text-based symbols at runtime to class methods in
a shared library. I know there are additional issues regarding calls
but this is mostly for confirmation of correct classes being loaded.
What code, if any, do I need to link in to my executable to provide
this capability and what are the api's for the respective
mangle/demangle functions.
thanx & later,
Ben Scherrey