mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-03-09 12:11:16 +00:00
devtools: Exclude default exports from symbol-checker script
See discussion in #4663.
This commit is contained in:
parent
2eb3c85c9a
commit
27116e87cc
@ -41,6 +41,10 @@ MAX_VERSIONS = {
|
|||||||
'GLIBCXX': (3,4,13),
|
'GLIBCXX': (3,4,13),
|
||||||
'GLIBC': (2,11)
|
'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'
|
READELF_CMD = '/usr/bin/readelf'
|
||||||
CPPFILT_CMD = '/usr/bin/c++filt'
|
CPPFILT_CMD = '/usr/bin/c++filt'
|
||||||
|
|
||||||
@ -105,6 +109,8 @@ if __name__ == '__main__':
|
|||||||
retval = 1
|
retval = 1
|
||||||
# Check exported symbols
|
# Check exported symbols
|
||||||
for sym,version in read_symbols(filename, False):
|
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)))
|
print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
|
||||||
retval = 1
|
retval = 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user