Skip to content

Commit

Permalink
devtools: have symbol check script check for exported symbols
Browse files Browse the repository at this point in the history
After last commit, our executables should export no symbols anymore.  To
make sure that this stays the case, verify this in the symbol checker
script.
  • Loading branch information
laanwj committed Apr 30, 2014
1 parent 92e3022 commit 202c95c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrib/devtools/symbol-check.py
Expand Up @@ -98,10 +98,15 @@ def check_version(max_versions, version):
cppfilt = CPPFilt()
retval = 0
for filename in sys.argv[1:]:
# Check imported symbols
for sym,version in read_symbols(filename, True):
if version and not check_version(MAX_VERSIONS, version):
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
retval = 1
# Check exported symbols
for sym,version in read_symbols(filename, False):
print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
retval = 1

exit(retval)

Expand Down

0 comments on commit 202c95c

Please sign in to comment.