Based on #17857.
This adds dynamic library checks for MACHO executables to symbol-check.py. The script has been modified to function more like security-check.py
. The error output is now also slightly different. i.e:
0# Linux x86
1bitcoin-cli: symbol operator new[](unsigned long) from unsupported version GLIBCXX_3.4
2bitcoin-cli: export of symbol vtable for std::basic_ios<char, std::char_traits<char> > not allowed
3bitcoin-cli: NEEDED library libstdc++.so.6 is not allowed
4bitcoin-cli: failed IMPORTED_SYMBOLS EXPORTED_SYMBOLS LIBRARY_DEPENDENCIES
5
6# RISCV (skips exported symbols checks)
7bitcoin-tx: symbol operator new[](unsigned long) from unsupported version GLIBCXX_3.4
8bitcoin-tx: NEEDED library libstdc++.so.6 is not allowed
9bitcoin-tx: failed IMPORTED_SYMBOLS LIBRARY_DEPENDENCIES
10
11# macOS
12Checking macOS dynamic libraries...
13libboost_filesystem.dylib is not in ALLOWED_LIBRARIES!
14bitcoind: failed DYNAMIC_LIBRARIES
Compared to v0.19.0.1
the macOS allowed dylibs has been slimmed down somewhat:
0 src/qt/bitcoin-qt:
1 /usr/lib/libSystem.B.dylib
2-/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
3 /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
4 /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
5 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
6 /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
7 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
8 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
9-/System/Library/Frameworks/Security.framework/Versions/A/Security
10-/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
11 /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
12-/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
13-/System/Library/Frameworks/AGL.framework/Versions/A/AGL
14 /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
15 /usr/lib/libc++.1.dylib
16-/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
17 /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
18 /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
19 /usr/lib/libobjc.A.dylib