This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Symbols, type_info, and name mangling.


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]