diff --git a/polkadot/scripts/list-syscalls/list-syscalls.rb b/polkadot/scripts/list-syscalls/list-syscalls.rb index a4c542f054ed..9cef6f74b2eb 100755 --- a/polkadot/scripts/list-syscalls/list-syscalls.rb +++ b/polkadot/scripts/list-syscalls/list-syscalls.rb @@ -2,10 +2,13 @@ # A script to statically list syscalls used by a given binary. # -# Syntax: list-syscalls.rb [--only-used-syscalls] +# Syntax: list-syscalls.rb [--only-used-syscalls] # -# Author: @koute -# Source: https://gist.github.com/koute/166f82bfee5e27324077891008fca6eb +# NOTE: For accurate results, build the binary with musl and LTO enabled. +# Example: ./polkadot/scripts/list-syscalls/list-syscalls.rb target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls +# +# Author: @koute +# Source: https://gist.github.com/koute/166f82bfee5e27324077891008fca6eb require 'shellwords' require 'set'