I'm trying to write a script to produce a 'fake' version of a huge and messy code library, I thought using 'nm' on the binary and filtering just the text symbols might be the way to go, but I can't seem to get nm to display the return type of the function as well as the signature.
Many thanks in advance.
The return type of the function is not part of the name mangling. Return types are enforced by the compiler directly based on type rules.
It is possible to call a function defined as, for example, returning int
, and having a declaration for it returning, say char
. Most tools will not notice the mismatch. Considering all they ways you might shoot yourself in the foot, this isn't too bad since you would have to have gone out of your way to do it. Like by not using a header file common to both modules.
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