0

When I tried to figure out what was included into a shared library, I looked into the .so file with nm.

The output was like the following:

0000000000075956 t _ZN10CoordinateC1Eff
0000000000075956 t _ZN10CoordinateC2Eff //something regarding the struct Coordinate
...
00000000000de846 t ZN11Tracker7addNodeESt10unique_ptrI5INodeSt14default_deleteIS1_EE //method addNode on class Tracker, which takes a unique_ptr of type INode
...
000000000007551a t _ZN12VehicleStateC1E10Coordinatedd //Method Coordinate on class VehicleState
000000000007551a t _ZN12VehicleStateC2E10Coordinatedd 

This looks kind of cryptic to me and does not look at all like for instance there: what does this nm output mean? The output makes use of colons, brackets and other symbols, while mine does not contain a single bracket in thousands of lines.

I wonder why I get such cryptic output?

My environment is the WSL (while Windows is up to date) and also the latest version of NM, which was available.

JFFIGK
  • 632
  • 1
  • 7
  • 24
  • 2
    *"I wonder why I get such cryptic output?"* - `nm` outputs mangled names by default. You can use `-C` or `--demangle`. Or you can pipe `nm` output to `c++filt`. For example, `echo _ZN10CoordinateC1Eff | c++filt` results in `Coordinate::Coordinate(float, float)`. Also see the [`nm(1)` man page](https://linux.die.net/man/1/nm). – jww Jan 21 '19 at 19:23
  • Read about [Name mangling](https://en.wikipedia.org/wiki/Name_mangling) – Mike Kinghan Jan 21 '19 at 20:04

0 Answers0