nmコマンドでstatic関数を見る

結論:-aオプションを使う

Sennaのexec_query関数はstaticな関数なんですが、この関数がnm -Dで出てこないので少し悩んでました。

mir@t43:/usr/local/mysql/bin$ nm -D /usr/lib/libsenna.so | grep exec_query

mir@t43:/usr/local/mysql/bin$ nm -a /usr/lib/libsenna.so | grep exec_query
00076a20 t exec_query

オプション-Dの代わりに-aを使えば解決〜。てか、inline staticも取れてる??ん〜〜〜??

mir@t43:/usr/local/mysql/bin$ nm -h
Usage: nm [option(s)] [file(s)]
 List symbols in [file(s)] (a.out by default).
 The options are:
  -a, --debug-syms       Display debugger-only symbols
  -A, --print-file-name  Print name of the input file before every symbol
  -B                     Same as --format=bsd
  -C, --demangle[=STYLE] Decode low-level symbol names into user-level names
                          The STYLE, if specified, can be `auto' (the default),
                          `gnu', `lucid', `arm', `hp', `edg', `gnu-v3', `java'
                          or `gnat'
      --no-demangle      Do not demangle low-level symbol names
  -D, --dynamic          Display dynamic symbols instead of normal symbols
...(以下略)...