From 9d822ab5f5c504769a3a334f6fa281a17f180250 Mon Sep 17 00:00:00 2001 From: Marcin S Date: Thu, 21 Sep 2023 15:06:37 +0200 Subject: [PATCH] Add note and example --- polkadot/scripts/list-syscalls/list-syscalls.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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'