symbols-check: fix `nm` invocation on MacOS
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 3 Aug 2019 17:08:38 +0000 (18:08 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Sun, 4 Aug 2019 10:06:27 +0000 (11:06 +0100)
commit8f1cdac7937eeb1a7874e6741fb32a7d6154382b
tree62b7c07039873eb95ace28673ace672701ee62a1
parent59f8809f3c696fc60c4447341702ca8a7bf557a5
symbols-check: fix `nm` invocation on MacOS

According to Mac OSX's man page [1], this is how we should get the list
of exported symbols:
  nm -g -P foo.dylib

-g to only show the exported symbols
-P to show it in a "portable" format, ie. readable by a script

Since this is supported by GNU nm as well, let's use that everywhere,
although some care needs to be taken as there are some differences in
the output.

[1] https://www.unix.com/man-page/osx/1/nm/

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
bin/symbols-check.py