Skip to content

Commit

Permalink
devtools: Exclude default exports from symbol-checker script
Browse files Browse the repository at this point in the history
See discussion in #4663.
  • Loading branch information
laanwj committed Aug 17, 2014
1 parent 2eb3c85 commit 27116e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
'GLIBCXX': (3,4,13),
'GLIBC': (2,11)
}
# Ignore symbols that are exported as part of every executable
IGNORE_EXPORTS = {
'_edata', '_end', '_init', '__bss_start', '_fini'
}
READELF_CMD = '/usr/bin/readelf'
CPPFILT_CMD = '/usr/bin/c++filt'

Expand Down Expand Up @@ -105,6 +109,8 @@ def check_version(max_versions, version):
retval = 1
# Check exported symbols
for sym,version in read_symbols(filename, False):
if sym in IGNORE_EXPORTS:
continue
print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
retval = 1

Expand Down

0 comments on commit 27116e8

Please sign in to comment.