@solana/web3.js 0.98.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -55
- package/lib/index.browser.esm.js +48 -24
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +101 -56
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +88 -64
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +42 -25
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +27 -45
- package/src/message.ts +9 -12
- package/src/transaction.ts +2 -2
- package/src/util/guarded-array-utils.ts +37 -0
- package/src/validator-info.ts +5 -4
- package/bin/bpf-sdk-install.sh +0 -38
- package/bin/localnet.sh +0 -161
- package/bpf-sdk/LICENSE +0 -13
- package/bpf-sdk/c/README.md +0 -44
- package/bpf-sdk/c/bpf.ld +0 -20
- package/bpf-sdk/c/bpf.mk +0 -249
- package/bpf-sdk/c/inc/deserialize_deprecated.h +0 -115
- package/bpf-sdk/c/inc/solana_sdk.h +0 -669
- package/bpf-sdk/c/inc/stdio.h +0 -4
- package/bpf-sdk/c/inc/stdlib.h +0 -2
- package/bpf-sdk/c/inc/string.h +0 -7
- package/bpf-sdk/c/inc/sys/param.h +0 -1
- package/bpf-sdk/c/inc/wchar.h +0 -1
- package/bpf-sdk/env.sh +0 -39
- package/bpf-sdk/rust/bpf.ld +0 -20
- package/bpf-sdk/rust/build.sh +0 -21
- package/bpf-sdk/rust/clean.sh +0 -17
- package/bpf-sdk/rust/xargo-build.sh +0 -29
- package/bpf-sdk/scripts/dump.sh +0 -45
- package/bpf-sdk/scripts/install.sh +0 -178
- package/bpf-sdk/scripts/objcopy.sh +0 -6
- package/bpf-sdk/scripts/package.sh +0 -19
- package/bpf-sdk/scripts/strip.sh +0 -23
- package/bpf-sdk/version.txt +0 -2
- package/doc/assets/css/main.css +0 -2660
- package/doc/assets/images/icons.png +0 -0
- package/doc/assets/images/icons@2x.png +0 -0
- package/doc/assets/images/widgets.png +0 -0
- package/doc/assets/images/widgets@2x.png +0 -0
- package/doc/assets/js/main.js +0 -248
- package/doc/assets/js/search.js +0 -1
- package/doc/classes/account.html +0 -244
- package/doc/classes/authorized.html +0 -234
- package/doc/classes/bpfloader.html +0 -267
- package/doc/classes/connection.html +0 -2354
- package/doc/classes/loader.html +0 -275
- package/doc/classes/lockup.html +0 -250
- package/doc/classes/message.html +0 -326
- package/doc/classes/nonceaccount.html +0 -233
- package/doc/classes/publickey.html +0 -411
- package/doc/classes/secp256k1program.html +0 -308
- package/doc/classes/stakeinstruction.html +0 -403
- package/doc/classes/stakeprogram.html +0 -503
- package/doc/classes/systeminstruction.html +0 -563
- package/doc/classes/systemprogram.html +0 -503
- package/doc/classes/transaction.html +0 -688
- package/doc/classes/transactioninstruction.html +0 -240
- package/doc/classes/validatorinfo.html +0 -279
- package/doc/classes/voteaccount.html +0 -331
- package/doc/index.html +0 -640
- package/doc/interfaces/feecalculator.html +0 -166
- package/doc/modules.html +0 -4682
- package/examples/README.md +0 -10
- package/examples/account.html +0 -24
- package/examples/account.js +0 -10
- package/examples/bpf-c-noop/.gitignore +0 -1
- package/examples/bpf-c-noop/makefile +0 -1
- package/examples/bpf-c-noop/src/noop/noop.c +0 -19
- package/examples/bpf-rust-noop/.gitignore +0 -3
- package/examples/bpf-rust-noop/Cargo.toml +0 -23
- package/examples/bpf-rust-noop/Xargo.toml +0 -2
- package/examples/bpf-rust-noop/src/lib.rs +0 -70
- package/examples/get-balance.html +0 -37
- package/examples/get-balance.js +0 -18
package/bpf-sdk/env.sh
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Configures the BPF SDK environment
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
if [ -z "$bpf_sdk" ]; then
|
|
6
|
-
bpf_sdk=.
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
# Ensure the sdk is installed
|
|
10
|
-
"$bpf_sdk"/scripts/install.sh
|
|
11
|
-
|
|
12
|
-
# Use the SDK's version of llvm to build the compiler-builtins for BPF
|
|
13
|
-
export CC="$bpf_sdk/dependencies/bpf-tools/llvm/bin/clang"
|
|
14
|
-
export AR="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-ar"
|
|
15
|
-
export OBJDUMP="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objdump"
|
|
16
|
-
export OBJCOPY="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objcopy"
|
|
17
|
-
|
|
18
|
-
# Use the SDK's version of Rust to build for BPF
|
|
19
|
-
export RUSTUP_TOOLCHAIN=bpf
|
|
20
|
-
export RUSTFLAGS="
|
|
21
|
-
-C lto=no \
|
|
22
|
-
-C opt-level=2 \
|
|
23
|
-
-C link-arg=-z -C link-arg=notext \
|
|
24
|
-
-C link-arg=-T$bpf_sdk/rust/bpf.ld \
|
|
25
|
-
-C link-arg=--Bdynamic \
|
|
26
|
-
-C link-arg=-shared \
|
|
27
|
-
-C link-arg=--threads=1 \
|
|
28
|
-
-C link-arg=--entry=entrypoint \
|
|
29
|
-
-C linker=$bpf_sdk/dependencies/bpf-tools/llvm/bin/ld.lld"
|
|
30
|
-
|
|
31
|
-
# CARGO may be set if run from within cargo, causing
|
|
32
|
-
# incompatibilities between cargo and xargo versions
|
|
33
|
-
unset CARGO
|
|
34
|
-
|
|
35
|
-
export XARGO="$bpf_sdk"/dependencies/bin/xargo
|
|
36
|
-
export XARGO_TARGET=bpfel-unknown-unknown
|
|
37
|
-
export XARGO_HOME="$bpf_sdk/dependencies/xargo"
|
|
38
|
-
export XARGO_RUST_SRC="$bpf_sdk/dependencies/rust-bpf-sysroot/src"
|
|
39
|
-
export RUST_COMPILER_RT_ROOT="$bpf_sdk/dependencies/rust-bpf-sysroot/src/compiler-rt"
|
package/bpf-sdk/rust/bpf.ld
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
PHDRS
|
|
2
|
-
{
|
|
3
|
-
text PT_LOAD ;
|
|
4
|
-
rodata PT_LOAD ;
|
|
5
|
-
dynamic PT_DYNAMIC ;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
SECTIONS
|
|
9
|
-
{
|
|
10
|
-
. = SIZEOF_HEADERS;
|
|
11
|
-
.text : { *(.text*) } :text
|
|
12
|
-
.rodata : { *(.rodata*) } :rodata
|
|
13
|
-
.dynamic : { *(.dynamic) } :dynamic
|
|
14
|
-
.data.rel.ro : { *(.data.rel.ro*) } :dynamic
|
|
15
|
-
.dynsym : { *(.dynsym) } :dynamic
|
|
16
|
-
.dynstr : { *(.dynstr) } :dynamic
|
|
17
|
-
.gnu.hash : { *(.gnu.hash) } :dynamic
|
|
18
|
-
.rel.dyn : { *(.rel.dyn) } :dynamic
|
|
19
|
-
.hash : { *(.hash) } :dynamic
|
|
20
|
-
}
|
package/bpf-sdk/rust/build.sh
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
if [[ "$#" -ne 1 ]]; then
|
|
4
|
-
echo "Error: Must provide the full path to the project to build"
|
|
5
|
-
exit 1
|
|
6
|
-
fi
|
|
7
|
-
if [[ ! -f "$1/Cargo.toml" ]]; then
|
|
8
|
-
echo "Error: Cannot find project: $1"
|
|
9
|
-
exit 1
|
|
10
|
-
fi
|
|
11
|
-
bpf_sdk=$(cd "$(dirname "$0")/.." && pwd)
|
|
12
|
-
|
|
13
|
-
echo "Building $1"
|
|
14
|
-
set -e
|
|
15
|
-
# shellcheck source=sdk/bpf/env.sh
|
|
16
|
-
source "$bpf_sdk"/env.sh
|
|
17
|
-
|
|
18
|
-
cd "$1"
|
|
19
|
-
"$XARGO" build --target "$XARGO_TARGET" --release --no-default-features --features program
|
|
20
|
-
|
|
21
|
-
{ { set +x; } 2>/dev/null; echo Success; }
|
package/bpf-sdk/rust/clean.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
if [ "$#" -ne 1 ]; then
|
|
4
|
-
echo "Error: Must provide the full path to the project to build"
|
|
5
|
-
exit 1
|
|
6
|
-
fi
|
|
7
|
-
if [ ! -f "$1/Cargo.toml" ]; then
|
|
8
|
-
echo "Error: Cannot find project: $1"
|
|
9
|
-
exit 1
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
cd "$1"
|
|
13
|
-
|
|
14
|
-
set -e
|
|
15
|
-
|
|
16
|
-
echo "Cleaning $1"
|
|
17
|
-
cargo clean
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
bpf_sdk=$(cd "$(dirname "$0")/.." && pwd)
|
|
4
|
-
# shellcheck source=sdk/bpf/env.sh
|
|
5
|
-
source "$bpf_sdk"/env.sh
|
|
6
|
-
|
|
7
|
-
set -e
|
|
8
|
-
(
|
|
9
|
-
while true; do
|
|
10
|
-
if [[ -r Xargo.toml ]]; then
|
|
11
|
-
break;
|
|
12
|
-
fi
|
|
13
|
-
if [[ $PWD = / ]]; then
|
|
14
|
-
cat <<EOF
|
|
15
|
-
Error: Failed to find Xargo.toml
|
|
16
|
-
|
|
17
|
-
Please create a Xargo.toml file in the same directory as your Cargo.toml with
|
|
18
|
-
the following contents:
|
|
19
|
-
|
|
20
|
-
[target.bpfel-unknown-unknown.dependencies.std]
|
|
21
|
-
features = []
|
|
22
|
-
|
|
23
|
-
EOF
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
cd ..
|
|
27
|
-
done
|
|
28
|
-
)
|
|
29
|
-
exec "$XARGO" build --target "$XARGO_TARGET" --release "$@"
|
package/bpf-sdk/scripts/dump.sh
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
bpf_sdk=$(cd "$(dirname "$0")/.." && pwd)
|
|
4
|
-
# shellcheck source=sdk/bpf/env.sh
|
|
5
|
-
source "$bpf_sdk"/env.sh
|
|
6
|
-
|
|
7
|
-
so=$1
|
|
8
|
-
dump=$2
|
|
9
|
-
if [[ -z $so ]] || [[ -z $dump ]]; then
|
|
10
|
-
echo "Usage: $0 bpf-program.so dump.txt"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
if [[ ! -r $so ]]; then
|
|
15
|
-
echo "Error: File not found or readable: $so"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
if ! command -v rustfilt > /dev/null; then
|
|
20
|
-
echo "Error: rustfilt not found. It can be installed by running: cargo install rustfilt"
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
set -e
|
|
25
|
-
out_dir=$(dirname "$dump")
|
|
26
|
-
if [[ ! -d $out_dir ]]; then
|
|
27
|
-
mkdir -p "$out_dir"
|
|
28
|
-
fi
|
|
29
|
-
dump_mangled=$dump.mangled
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
set -ex
|
|
33
|
-
ls -la "$so" > "$dump_mangled"
|
|
34
|
-
"$bpf_sdk"/dependencies/bpf-tools/llvm/bin/llvm-readelf -aW "$so" >>"$dump_mangled"
|
|
35
|
-
"$OBJDUMP" --print-imm-hex --source --disassemble "$so" >> "$dump_mangled"
|
|
36
|
-
sed s/://g < "$dump_mangled" | rustfilt > "$dump"
|
|
37
|
-
)
|
|
38
|
-
rm -f "$dump_mangled"
|
|
39
|
-
|
|
40
|
-
if [[ ! -f "$dump" ]]; then
|
|
41
|
-
echo "Error: Failed to create $dump"
|
|
42
|
-
exit 1
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
echo "Wrote $dump"
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
mkdir -p "$(dirname "$0")"/../dependencies
|
|
4
|
-
cd "$(dirname "$0")"/../dependencies
|
|
5
|
-
|
|
6
|
-
if [[ "$(uname)" = Darwin ]]; then
|
|
7
|
-
machine=osx
|
|
8
|
-
else
|
|
9
|
-
machine=linux
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
download() {
|
|
13
|
-
declare url="$1/$2/$3"
|
|
14
|
-
declare filename=$3
|
|
15
|
-
declare wget_args=(
|
|
16
|
-
"$url" -O "$filename"
|
|
17
|
-
"--progress=dot:giga"
|
|
18
|
-
"--retry-connrefused"
|
|
19
|
-
"--read-timeout=30"
|
|
20
|
-
)
|
|
21
|
-
declare curl_args=(
|
|
22
|
-
-L "$url" -o "$filename"
|
|
23
|
-
)
|
|
24
|
-
if hash wget 2>/dev/null; then
|
|
25
|
-
wget_or_curl="wget ${wget_args[*]}"
|
|
26
|
-
elif hash curl 2>/dev/null; then
|
|
27
|
-
wget_or_curl="curl ${curl_args[*]}"
|
|
28
|
-
else
|
|
29
|
-
echo "Error: Neither curl nor wget were found" >&2
|
|
30
|
-
return 1
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
set -x
|
|
34
|
-
if $wget_or_curl; then
|
|
35
|
-
tar --strip-components 1 -jxf "$filename" || return 1
|
|
36
|
-
{ set +x; } 2>/dev/null
|
|
37
|
-
rm -rf "$filename"
|
|
38
|
-
return 0
|
|
39
|
-
fi
|
|
40
|
-
return 1
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
clone() {
|
|
44
|
-
declare url=$1
|
|
45
|
-
declare version=$2
|
|
46
|
-
|
|
47
|
-
rm -rf temp
|
|
48
|
-
if (
|
|
49
|
-
set -x
|
|
50
|
-
git clone --recursive --depth 1 --single-branch --branch "$version" "$url" temp
|
|
51
|
-
); then
|
|
52
|
-
(
|
|
53
|
-
shopt -s dotglob nullglob
|
|
54
|
-
mv temp/* .
|
|
55
|
-
)
|
|
56
|
-
return 0
|
|
57
|
-
fi
|
|
58
|
-
return 1
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get() {
|
|
62
|
-
declare version=$1
|
|
63
|
-
declare dirname=$2
|
|
64
|
-
declare job=$3
|
|
65
|
-
declare cache_root=~/.cache/solana
|
|
66
|
-
declare cache_dirname="$cache_root/$version/$dirname"
|
|
67
|
-
declare cache_partial_dirname="$cache_dirname"_partial
|
|
68
|
-
|
|
69
|
-
if [[ -r $cache_dirname ]]; then
|
|
70
|
-
ln -sf "$cache_dirname" "$dirname" || return 1
|
|
71
|
-
return 0
|
|
72
|
-
fi
|
|
73
|
-
|
|
74
|
-
rm -rf "$cache_partial_dirname" || return 1
|
|
75
|
-
mkdir -p "$cache_partial_dirname" || return 1
|
|
76
|
-
pushd "$cache_partial_dirname"
|
|
77
|
-
|
|
78
|
-
if $job; then
|
|
79
|
-
popd
|
|
80
|
-
mv "$cache_partial_dirname" "$cache_dirname" || return 1
|
|
81
|
-
ln -sf "$cache_dirname" "$dirname" || return 1
|
|
82
|
-
return 0
|
|
83
|
-
fi
|
|
84
|
-
popd
|
|
85
|
-
return 1
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
# Install xargo
|
|
89
|
-
version=0.3.22
|
|
90
|
-
if [[ ! -e xargo-$version.md ]] || [[ ! -x bin/xargo ]]; then
|
|
91
|
-
(
|
|
92
|
-
args=()
|
|
93
|
-
# shellcheck disable=SC2154
|
|
94
|
-
if [[ -n $rust_stable ]]; then
|
|
95
|
-
args+=(+"$rust_stable")
|
|
96
|
-
fi
|
|
97
|
-
args+=(install xargo --version "$version" --root .)
|
|
98
|
-
set -ex
|
|
99
|
-
cargo "${args[@]}"
|
|
100
|
-
)
|
|
101
|
-
exitcode=$?
|
|
102
|
-
if [[ $exitcode -ne 0 ]]; then
|
|
103
|
-
exit 1
|
|
104
|
-
fi
|
|
105
|
-
./bin/xargo --version >xargo-$version.md 2>&1
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
# Install Criterion
|
|
109
|
-
if [[ $machine == "linux" ]]; then
|
|
110
|
-
version=v2.3.3
|
|
111
|
-
else
|
|
112
|
-
version=v2.3.2
|
|
113
|
-
fi
|
|
114
|
-
if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
|
|
115
|
-
(
|
|
116
|
-
set -e
|
|
117
|
-
rm -rf criterion*
|
|
118
|
-
job="download \
|
|
119
|
-
https://github.com/Snaipe/Criterion/releases/download \
|
|
120
|
-
$version \
|
|
121
|
-
criterion-$version-$machine-x86_64.tar.bz2 \
|
|
122
|
-
criterion"
|
|
123
|
-
get $version criterion "$job"
|
|
124
|
-
)
|
|
125
|
-
exitcode=$?
|
|
126
|
-
if [[ $exitcode -ne 0 ]]; then
|
|
127
|
-
exit 1
|
|
128
|
-
fi
|
|
129
|
-
touch criterion-$version.md
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
# Install Rust-BPF
|
|
133
|
-
version=v1.1
|
|
134
|
-
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
|
|
135
|
-
(
|
|
136
|
-
set -e
|
|
137
|
-
rm -rf bpf-tools*
|
|
138
|
-
rm -rf xargo
|
|
139
|
-
job="download \
|
|
140
|
-
https://github.com/solana-labs/bpf-tools/releases/download \
|
|
141
|
-
$version \
|
|
142
|
-
solana-bpf-tools-$machine.tar.bz2 \
|
|
143
|
-
bpf-tools"
|
|
144
|
-
get $version bpf-tools "$job"
|
|
145
|
-
)
|
|
146
|
-
exitcode=$?
|
|
147
|
-
if [[ $exitcode -ne 0 ]]; then
|
|
148
|
-
exit 1
|
|
149
|
-
fi
|
|
150
|
-
touch bpf-tools-$version.md
|
|
151
|
-
fi
|
|
152
|
-
set -ex
|
|
153
|
-
./bpf-tools/rust/bin/rustc --print sysroot
|
|
154
|
-
set +e
|
|
155
|
-
rustup toolchain uninstall bpf
|
|
156
|
-
set -e
|
|
157
|
-
rustup toolchain link bpf bpf-tools/rust
|
|
158
|
-
|
|
159
|
-
# Install Rust-BPF Sysroot sources
|
|
160
|
-
version=v1.1
|
|
161
|
-
if [[ ! -e rust-bpf-sysroot-$version.md || ! -e rust-bpf-sysroot ]]; then
|
|
162
|
-
(
|
|
163
|
-
set -e
|
|
164
|
-
rm -rf rust-bpf-sysroot*
|
|
165
|
-
rm -rf xargo
|
|
166
|
-
job="clone \
|
|
167
|
-
https://github.com/solana-labs/rust-bpf-sysroot.git \
|
|
168
|
-
$version"
|
|
169
|
-
get $version rust-bpf-sysroot "$job"
|
|
170
|
-
)
|
|
171
|
-
exitcode=$?
|
|
172
|
-
if [[ $exitcode -ne 0 ]]; then
|
|
173
|
-
exit 1
|
|
174
|
-
fi
|
|
175
|
-
touch rust-bpf-sysroot-$version.md
|
|
176
|
-
fi
|
|
177
|
-
|
|
178
|
-
exit 0
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -ex
|
|
3
|
-
|
|
4
|
-
cd "$(dirname "$0")"/../../..
|
|
5
|
-
|
|
6
|
-
echo --- Creating bpf-sdk tarball
|
|
7
|
-
|
|
8
|
-
rm -rf bpf-sdk.tar.bz2 bpf-sdk/
|
|
9
|
-
mkdir bpf-sdk/
|
|
10
|
-
cp LICENSE bpf-sdk/
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
ci/crate-version.sh sdk/Cargo.toml
|
|
14
|
-
git rev-parse HEAD
|
|
15
|
-
) > bpf-sdk/version.txt
|
|
16
|
-
|
|
17
|
-
cp -a sdk/bpf/* bpf-sdk/
|
|
18
|
-
|
|
19
|
-
tar jvcf bpf-sdk.tar.bz2 bpf-sdk/
|
package/bpf-sdk/scripts/strip.sh
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
so=$1
|
|
4
|
-
if [[ ! -r $so ]]; then
|
|
5
|
-
echo "Error: file not found: $so"
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
so_stripped=$2
|
|
9
|
-
if [[ -z $so_stripped ]]; then
|
|
10
|
-
echo "Usage: $0 unstripped.so stripped.so"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
bpf_sdk=$(cd "$(dirname "$0")/.." && pwd)
|
|
15
|
-
# shellcheck source=sdk/bpf/env.sh
|
|
16
|
-
source "$bpf_sdk"/env.sh
|
|
17
|
-
|
|
18
|
-
set -e
|
|
19
|
-
out_dir=$(dirname "$so_stripped")
|
|
20
|
-
if [[ ! -d $out_dir ]]; then
|
|
21
|
-
mkdir -p "$out_dir"
|
|
22
|
-
fi
|
|
23
|
-
"$bpf_sdk"/dependencies/bpf-tools/llvm/bin/llvm-objcopy --strip-all "$so" "$so_stripped"
|
package/bpf-sdk/version.txt
DELETED