mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-22 01:41:49 +00:00
20 lines
418 B
Bash
Executable File
20 lines
418 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
bpftool="$1"
|
|
input="$2"
|
|
skel="$3"
|
|
subskel="$4"
|
|
|
|
stem="${input%.o}"
|
|
name="${input%.bpf.o}"
|
|
name="${name##*/}"
|
|
|
|
"$bpftool" gen object "$stem".l1o "$input"
|
|
"$bpftool" gen object "$stem".l2o "$stem".l1o
|
|
"$bpftool" gen object "$stem".l3o "$stem".l2o
|
|
cmp "$stem".l2o "$stem".l3o
|
|
"$bpftool" gen skeleton "$stem".l3o name "$name" > "$skel"
|
|
"$bpftool" gen subskeleton "$stem".l3o name "$name" > "$subskel"
|