Backport of #17857.
The first argument in bin_PROGRAMS (bitcoind) was being silently dropped and never passed into the check-security.py or check-symbols.py scripts.
This has been the case since the scripts were added to the makefile in https://github.com/bitcoin/bitcoin/commit/f3d3eaf78eb51238d799d8f20a585550d1567719.
Example of the behavior:
0# touch a, touch b, touch c
1# python3 args.py < a b c
2
3import sys
4if __name__ == '__main__':
5 print(sys.argv)
6 # ['args.py', 'b', 'c']
7
8 # if you add some lines to "a",
9 # you'll see them here..
10 for line in sys.stdin:
11 print(line)
Github-Pull: #17857 Rebased-From: 71af793512100ee7d508c3fb815af47925fe80ba