devtools: have symbol check script check for exported symbols

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.
This commit is contained in:
Wladimir J. van der Laan 2014-04-30 15:26:36 +02:00
parent 92e3022f88
commit 202c95c216

View File

@ -98,10 +98,15 @@ if __name__ == '__main__':
cppfilt = CPPFilt() cppfilt = CPPFilt()
retval = 0 retval = 0
for filename in sys.argv[1:]: for filename in sys.argv[1:]:
# Check imported symbols
for sym,version in read_symbols(filename, True): for sym,version in read_symbols(filename, True):
if version and not check_version(MAX_VERSIONS, version): if version and not check_version(MAX_VERSIONS, version):
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version)) print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
retval = 1 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) exit(retval)