|
41 | 41 | #
|
42 | 42 | MAX_VERSIONS = {
|
43 | 43 | 'GCC': (4,8,0),
|
44 |
| -'GLIBC': (2,17), |
| 44 | +'GLIBC': { |
| 45 | + pixie.EM_386: (2,17), |
| 46 | + pixie.EM_X86_64: (2,17), |
| 47 | + pixie.EM_ARM: (2,17), |
| 48 | + pixie.EM_AARCH64:(2,17), |
| 49 | + pixie.EM_PPC64: (2,17), |
| 50 | + pixie.EM_RISCV: (2,27), |
| 51 | +}, |
45 | 52 | 'LIBATOMIC': (1,0),
|
46 | 53 | 'V': (0,5,0), # xkb (bitcoin-qt only)
|
47 | 54 | }
|
|
79 | 86 | 'libfreetype.so.6', # font parsing
|
80 | 87 | 'libdl.so.2' # programming interface to dynamic linker
|
81 | 88 | }
|
82 |
| -ARCH_MIN_GLIBC_VER = { |
83 |
| -pixie.EM_386: (2,1), |
84 |
| -pixie.EM_X86_64: (2,2,5), |
85 |
| -pixie.EM_ARM: (2,4), |
86 |
| -pixie.EM_AARCH64:(2,17), |
87 |
| -pixie.EM_PPC64: (2,17), |
88 |
| -pixie.EM_RISCV: (2,27) |
89 |
| -} |
90 | 89 |
|
91 | 90 | MACHO_ALLOWED_LIBRARIES = {
|
92 | 91 | # bitcoind and bitcoin-qt
|
@@ -162,7 +161,10 @@ def check_version(max_versions, version, arch) -> bool:
|
162 | 161 | ver = tuple([int(x) for x in ver.split('.')])
|
163 | 162 | if not lib in max_versions:
|
164 | 163 | return False
|
165 |
| - return ver <= max_versions[lib] or lib == 'GLIBC' and ver <= ARCH_MIN_GLIBC_VER[arch] |
| 164 | + if isinstance(max_versions[lib], tuple): |
| 165 | + return ver <= max_versions[lib] |
| 166 | + else: |
| 167 | + return ver <= max_versions[lib][arch] |
166 | 168 |
|
167 | 169 | def check_imported_symbols(filename) -> bool:
|
168 | 170 | elf = pixie.load(filename)
|
|
0 commit comments