[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Symbols, type_info, and name mangling.
From:       Benjamin Scherrey <scherrey () switchco ! com>
Date:       2000-01-13 8:24:54
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic