Bitcoin
Classes | Functions | Variables
symbol-check Namespace Reference

Classes

class  CPPFilt
 

Functions

def read_symbols (executable, imports=True)
 
def check_version (max_versions, version, arch)
 
def read_libraries (filename)
 

Variables

dictionary MAX_VERSIONS
 
dictionary IGNORE_EXPORTS
 
 READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
 
 CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
 
dictionary ALLOWED_LIBRARIES
 
dictionary ARCH_MIN_GLIBC_VER
 
 cppfilt = CPPFilt()
 
int retval = 0
 

Function Documentation

◆ check_version()

def symbol-check.check_version (   max_versions,
  version,
  arch 
)

◆ read_libraries()

def symbol-check.read_libraries (   filename)

◆ read_symbols()

def symbol-check.read_symbols (   executable,
  imports = True 
)
Parse an ELF executable and return a list of (symbol,version) tuples
for dynamic, imported symbols.

Variable Documentation

◆ ALLOWED_LIBRARIES

dictionary symbol-check.ALLOWED_LIBRARIES
Initial value:
1 = {
2 # bitcoind and bitcoin-qt
3 'libgcc_s.so.1', # GCC base support
4 'libc.so.6', # C library
5 'libpthread.so.0', # threading
6 'libanl.so.1', # DNS resolve
7 'libm.so.6', # math library
8 'librt.so.1', # real-time (clock)
9 'libatomic.so.1',
10 'ld-linux-x86-64.so.2', # 64-bit dynamic linker
11 'ld-linux.so.2', # 32-bit dynamic linker
12 'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker
13 'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
14 'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker
15 # bitcoin-qt only
16 'libX11-xcb.so.1', # part of X11
17 'libX11.so.6', # part of X11
18 'libxcb.so.1', # part of X11
19 'libfontconfig.so.1', # font support
20 'libfreetype.so.6', # font parsing
21 'libdl.so.2' # programming interface to dynamic linker
22 }

◆ ARCH_MIN_GLIBC_VER

dictionary symbol-check.ARCH_MIN_GLIBC_VER
Initial value:
1 = {
2 '80386': (2,1),
3 'X86-64': (2,2,5),
4 'ARM': (2,4),
5 'AArch64':(2,17),
6 'RISC-V': (2,27)
7 }

◆ cppfilt

symbol-check.cppfilt = CPPFilt()

◆ CPPFILT_CMD

symbol-check.CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')

◆ IGNORE_EXPORTS

dictionary symbol-check.IGNORE_EXPORTS
Initial value:
1 = {
2 '_edata', '_end', '__end__', '_init', '__bss_start', '__bss_start__', '_bss_end__', '__bss_end__', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr'
3 }

◆ MAX_VERSIONS

dictionary symbol-check.MAX_VERSIONS
Initial value:
1 = {
2 'GCC': (4,4,0),
3 'CXXABI': (1,3,3),
4 'GLIBCXX': (3,4,13),
5 'GLIBC': (2,11),
6 'LIBATOMIC': (1,0)
7 }

◆ READELF_CMD

symbol-check.READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')

◆ retval

int symbol-check.retval = 0