diff options
author | merge-script <fanquake@gmail.com> | 2024-06-26 10:27:44 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-06-26 10:27:44 +0100 |
commit | be4df59696a41cec5a33383524313a17e1c5e4da (patch) | |
tree | 2efabc7591a9b4c107224ec840d1d6e4888aab03 | |
parent | 323b0acfcb9380ce4b3c12a3d0b341d7bb3bfe08 (diff) | |
parent | 4289dd02cce688a69c596f7cd5e47f831b00aa1b (diff) |
Merge bitcoin/bitcoin#30312: contrib: add R(UN)PATH check to ELF symbol-check
4289dd02cce688a69c596f7cd5e47f831b00aa1b contrib: add R(UN)PATH check to ELF symbol-check (fanquake)
Pull request description:
Our binaries shouldn't contain any rpaths, or runpaths, so check that at release time.
Guix build (aarch64):
```bash
14f1b54936f71aaf8fedb987e1c2f5642c34ac35f4856cdbd7bf7b4a9f42507c guix-build-4289dd02cce6/output/aarch64-linux-gnu/SHA256SUMS.part
b120503ac4a37c160aa1bdc662348a2a662cb9b3d0477daa177e92afacab6a27 guix-build-4289dd02cce6/output/aarch64-linux-gnu/bitcoin-4289dd02cce6-aarch64-linux-gnu-debug.tar.gz
6416e3678aa13301ba2327e65dcd83afefd15d21c96c1b574cf616a65466a260 guix-build-4289dd02cce6/output/aarch64-linux-gnu/bitcoin-4289dd02cce6-aarch64-linux-gnu.tar.gz
b7f11fa4abc034b32c208a9d642a0cafc0de693d49c8f3b28d1cf2d318af6826 guix-build-4289dd02cce6/output/arm-linux-gnueabihf/SHA256SUMS.part
7cf6269025b10bc5ad65cd98baba68b4b65d3caabcd4d62e7af892bbb16c253f guix-build-4289dd02cce6/output/arm-linux-gnueabihf/bitcoin-4289dd02cce6-arm-linux-gnueabihf-debug.tar.gz
c136665417cc1f9254f4541c1161ea6d24d2325e4baa2dd4a306f67a1edf9c20 guix-build-4289dd02cce6/output/arm-linux-gnueabihf/bitcoin-4289dd02cce6-arm-linux-gnueabihf.tar.gz
37dd0359e073cbb38dcd6e17953d31e414ce27516c31b18ef6aa1bc9530dbed2 guix-build-4289dd02cce6/output/arm64-apple-darwin/SHA256SUMS.part
3d01f5db06e1b1cbebc5a5a4277ad3da8911afe35e111d4650e2beee6038cfdb guix-build-4289dd02cce6/output/arm64-apple-darwin/bitcoin-4289dd02cce6-arm64-apple-darwin-unsigned.tar.gz
9d8ad7cbdc1e154b33c138de21e7a0ffc8a8857b522db9272c70d5c10732460c guix-build-4289dd02cce6/output/arm64-apple-darwin/bitcoin-4289dd02cce6-arm64-apple-darwin-unsigned.zip
23f14eeaeac2e881e41543a796dfa65f132e89153281f9fbcb8019d08fff7eb2 guix-build-4289dd02cce6/output/arm64-apple-darwin/bitcoin-4289dd02cce6-arm64-apple-darwin.tar.gz
b62d9e202e5414ebefe129e733beaee76b4f9b05a7dd20807fbbdbe24f27f692 guix-build-4289dd02cce6/output/dist-archive/bitcoin-4289dd02cce6.tar.gz
1301b33745b9016bbb7f038ee2004f630244deaa6575b6c75391cda2d8d3455d guix-build-4289dd02cce6/output/powerpc64-linux-gnu/SHA256SUMS.part
54e988c3d3fc204d4b232dcf24df8a80733c46e3adf9ea0c81a1637609fc1131 guix-build-4289dd02cce6/output/powerpc64-linux-gnu/bitcoin-4289dd02cce6-powerpc64-linux-gnu-debug.tar.gz
6acb3348d67d3e96a6f3a6e782ae088532b75d4b38cbfe249e114e07eafefdb6 guix-build-4289dd02cce6/output/powerpc64-linux-gnu/bitcoin-4289dd02cce6-powerpc64-linux-gnu.tar.gz
cc30cfe72eefa498f347d825c57a19501d0c24330d2b4bcdfa432cf7a17880e8 guix-build-4289dd02cce6/output/riscv64-linux-gnu/SHA256SUMS.part
a56144f8a816c6b62970c29d6c805fe7d26c4d1171e96379e1e6a53c7cb504f6 guix-build-4289dd02cce6/output/riscv64-linux-gnu/bitcoin-4289dd02cce6-riscv64-linux-gnu-debug.tar.gz
7d67eac59846d478b5ecefa1396d3214c2f9b394ec4de4c099b2b2304750e13e guix-build-4289dd02cce6/output/riscv64-linux-gnu/bitcoin-4289dd02cce6-riscv64-linux-gnu.tar.gz
2d1b1ec32f566ad37b7fb6e2d8b150389c0d02013fc99b12e9e93cb938cfdbc7 guix-build-4289dd02cce6/output/x86_64-apple-darwin/SHA256SUMS.part
1bb7a360974cc839499f82cf00dc6e59c3584a3094382086217eacb97b6da931 guix-build-4289dd02cce6/output/x86_64-apple-darwin/bitcoin-4289dd02cce6-x86_64-apple-darwin-unsigned.tar.gz
821a1587e285a8514a9f2ed9bec7d422e91d5f1db3cbb9e4c5ce4467298e692f guix-build-4289dd02cce6/output/x86_64-apple-darwin/bitcoin-4289dd02cce6-x86_64-apple-darwin-unsigned.zip
15956787628f5014adc53fe98fc995c56424c8e6c1e698283f65099751a61dbd guix-build-4289dd02cce6/output/x86_64-apple-darwin/bitcoin-4289dd02cce6-x86_64-apple-darwin.tar.gz
76e8a8275f27a5d2b4eb29c0440c5dfbecb0d9348362ff7defe989820d5ec80b guix-build-4289dd02cce6/output/x86_64-linux-gnu/SHA256SUMS.part
3c8b19f1a130ebb12a1ca4103fa283e71d909f09da5cef8047db1e7e7dfea162 guix-build-4289dd02cce6/output/x86_64-linux-gnu/bitcoin-4289dd02cce6-x86_64-linux-gnu-debug.tar.gz
87b3735cda595556e8adfd4de5c9cc966e9996cdb76b8f9dfa8c978d37397d40 guix-build-4289dd02cce6/output/x86_64-linux-gnu/bitcoin-4289dd02cce6-x86_64-linux-gnu.tar.gz
fc535f76e6323fb0feeeee790865d0d2c8ea9d2c85d72a620acfb83546fb7628 guix-build-4289dd02cce6/output/x86_64-w64-mingw32/SHA256SUMS.part
9fd5d3b4e91fa8c4d137c9f8d2089c81f4c4165bb6ab9a404b163f7b363587fd guix-build-4289dd02cce6/output/x86_64-w64-mingw32/bitcoin-4289dd02cce6-win64-debug.zip
b4658cdc94e70cd7b810a44770684b742d96d7d40d720cc54f209784e0ad4ad6 guix-build-4289dd02cce6/output/x86_64-w64-mingw32/bitcoin-4289dd02cce6-win64-setup-unsigned.exe
e4557d1f8c1b0eb5014ad56d2a17a0a618c3ba7e6d073628e633382e1d4191aa guix-build-4289dd02cce6/output/x86_64-w64-mingw32/bitcoin-4289dd02cce6-win64-unsigned.tar.gz
3f9a104633f6962b0b8efb64a7d6be453f56617561e7f5b49a84ae191942ea5d guix-build-4289dd02cce6/output/x86_64-w64-mingw32/bitcoin-4289dd02cce6-win64.zip
```
ACKs for top commit:
theuni:
utACK 4289dd02cce688a69c596f7cd5e47f831b00aa1b
hebasto:
ACK 4289dd02cce688a69c596f7cd5e47f831b00aa1b.
Tree-SHA512: f2e1f6525f699e0d069c70f5e7f1a7e8f8758dcdaff778d49e671bc106a9592f9a7b25c4dbeeaf92b654646fd3b902ad45c8547fd1b28e3287933e8c1497333d
-rwxr-xr-x | contrib/devtools/symbol-check.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index 6613874ce3..1d487d4f6b 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -212,6 +212,11 @@ def check_exported_symbols(binary) -> bool: ok = False return ok +def check_RUNPATH(binary) -> bool: + assert binary.get(lief.ELF.DYNAMIC_TAGS.RUNPATH) is None + assert binary.get(lief.ELF.DYNAMIC_TAGS.RPATH) is None + return True + def check_ELF_libraries(binary) -> bool: ok: bool = True for library in binary.libraries: @@ -277,6 +282,7 @@ lief.EXE_FORMATS.ELF: [ ('LIBRARY_DEPENDENCIES', check_ELF_libraries), ('INTERPRETER_NAME', check_ELF_interpreter), ('ABI', check_ELF_ABI), + ('RUNPATH', check_RUNPATH), ], lief.EXE_FORMATS.MACHO: [ ('DYNAMIC_LIBRARIES', check_MACHO_libraries), |