Hey guys, I need to make a list of some functions that are listed in the linker output. The syntax i get is as follows:
int foo(int num,double dnum, Temp & temp) (in namespace "funcsns")
Turns into:
.text._ZN7funcsns3fooEidRNS_4TempE
(You might know it from the "undefined symbol" and some other linking errors that print functions names)
Now, i can write a script that somehow turns it into something readable but i wonder if there is a smart way of doing it.
Please share your ideas!
thanks.
On a system using the GNU toolchain, the c++filt program does exactly what you're looking for. It's part of the "binutils" package. Dunno about other systems.
The ".text." isn't part of the mangled name. Running c++filt _ZN7funcsns3fooEidRNS_4TempE yields funcsns::foo(int, double, funcsns::Temp&).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With